Created
September 6, 2020 17:24
-
-
Save liannewriting/e6bb3387e3d74bcaf93be2bcb52bf4f3 to your computer and use it in GitHub Desktop.
Twitter sentiment analysis python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i, t in enumerate(neg_thresholds): | |
neg_pred = -df_labelled['textblob_sentiment'] > t | |
acc = accuracy_score(df_labelled['is_neg'], neg_pred) | |
print('threshold: {}, accuracy: {}'.format(-t, acc)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment