Skip to content

Instantly share code, notes, and snippets.

@ravikiranj
Created May 9, 2012 03:36
Show Gist options
  • Select an option

  • Save ravikiranj/2641621 to your computer and use it in GitHub Desktop.

Select an option

Save ravikiranj/2641621 to your computer and use it in GitHub Desktop.
Most Informative Features
# print informative features about the classifier
print NBClassifier.show_most_informative_features(10)
Output
======
Most Informative Features
contains(twitter) = False positi : neutra = 2.3 : 1.0
contains(car) = False positi : negati = 2.3 : 1.0
contains(hurts) = False positi : negati = 2.3 : 1.0
contains(articles) = False positi : neutra = 1.4 : 1.0
contains(heard) = False neutra : positi = 1.4 : 1.0
contains(hey) = False neutra : positi = 1.4 : 1.0
contains(total) = False positi : negati = 1.4 : 1.0
contains(mi) = False positi : neutra = 1.4 : 1.0
contains(day) = False positi : negati = 1.4 : 1.0
contains(makeitcount) = False positi : neutra = 1.4 : 1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment