I am new to machine learning and doing a project on sentiment analysis for tourism reviews. I first preprocessed the reviews and performed feature extraction and then I chose Naïve Bayes classifier and get the accuracy of 78%. But now I am stuck here that how to save this model and vector features so that I could predict the review in future using this model. Here is the code...
vectorizer = TfidfVectorizer(max_features=5000,ngram_range=(1,1))
X = vectorizer.fit_transform(reviews).toarray()
feature_names = vectorizer.get_feature_names()
X_train,X_test,Y_train,Y_test=train_test_split(X,polarity,test_size=0.30,random_state=0)
classifier=MultinomialNB()
classifier.fit(X_train,Y_train)
Y_predict=classifier.predict(X_test)
report=metrics.classification_report(Y_test, Y_predict)
accuracy=metrics.accuracy_score(Y_test, Y_predict)
Can anybody can guide?