Problem Statement :
Data consists of 10000 rows and 3 columns as "tweet","tweet_tokens","sentiment"
This data is from nltk.corpus import twitter_samples
Sample data how it looks like :
shape : (10000, 3)
Used model : MultibinomialNB to train and predict the dataset with CountVectorizer(ngram=(1,1)) and got the following scores :
Precision : 0.771 / Recall : 0.698 / Accuracy : 0.745
Features what it looks like in dataframe :
Saving the model with pickle and predicting it for ONE tweet returns ERROR
Problem : Can we use this trained model to predict just one tweet and output as "Positive" or "Negative" ??
Tried using this model but ends up always as dimension mismatch or shape not aligned
Question : Do we always have to make new_test_data shape as of trained_data_set ??
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…