Skip to content

Instantly share code, notes, and snippets.

@liannewriting
Created September 6, 2020 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liannewriting/c0ff0abfa9ee4e17c7bc97e3f332d16f to your computer and use it in GitHub Desktop.
Save liannewriting/c0ff0abfa9ee4e17c7bc97e3f332d16f to your computer and use it in GitHub Desktop.
Twitter sentiment analysis python
pos_fpr, pos_tpr, pos_thresholds = roc_curve(df_labelled['is_pos'], df_labelled['textblob_sentiment'], pos_label=1)
pos_roc_auc = auc(pos_fpr, pos_tpr)
plot_roc_curve(pos_fpr, pos_tpr, pos_roc_auc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment