Skip to content

Instantly share code, notes, and snippets.

@mikaelbr
Created March 11, 2013 18:15
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 mikaelbr/5136341 to your computer and use it in GitHub Desktop.
Save mikaelbr/5136341 to your computer and use it in GitHub Desktop.
Sentiment Analysis Grid Search Output log
######################################################################
# Showing for <methods.boost.Boosting object at 0x916aa6c>
# Total Score: 0.638452237001
precision recall f1-score support
negative 0.74 0.21 0.32 340
neutral 0.61 0.85 0.71 739
positive 0.67 0.62 0.65 575
avg / total 0.66 0.64 0.61 1654
[[ 70 192 78]
[ 12 627 100]
[ 13 203 359]]
######################################################################
######################################################################
# Showing for <methods.nb.NB object at 0x916afac>
# Best params: {'vect__ngram_range': (1, 1), 'vect__smooth_idf': True, 'vect__max_df': 0.5, 'vect__sublinear_tf': True, 'vect__preprocessor': <function placeholders at 0x9e166bc>, 'vect__stop_words': 'english', 'vect__use_idf': False, 'clf__alpha': 1.0}
# show_most_informative_features:
dimensionality: 6771
density: 1.0
top 15 keywords per class:
negative: today, don, time, tonight, amp, 1st, day, like, night, going, url,
quot, just, tomorrow, 39
neutral: tonight, sunday, game, friday, saturday, amp, just, day, 10, going,
night, quot, tomorrow, url, 39
positive: game, sunday, friday, love, going, amp, just, tonight, good, quot,
night, day, url, tomorrow, 39
# Total Score: 0.583434099154
precision recall f1-score support
negative 0.67 0.02 0.05 340
neutral 0.58 0.82 0.68 739
positive 0.59 0.61 0.60 575
avg / total 0.60 0.58 0.52 1654
[[ 8 213 119]
[ 3 607 129]
[ 1 224 350]]
######################################################################
######################################################################
# Showing for <methods.svm.SVM object at 0x9e49fcc>
# Best params: {'vect__ngram_range': (1, 1), 'vect__smooth_idf': True, 'vect__max_df': 0.5, 'vect__sublinear_tf': True, 'vect__preprocessor': <function no_usernames at 0x9e16614>, 'vect__stop_words': None, 'vect__use_idf': False, 'clf__C': 0.5}
# show_most_informative_features:
dimensionality: 7489
density: 0.996795299773
top 15 keywords per class:
negative: lost, why, injury, didn, not, worst, worse, stupid, cancelled, shit,
bad, sad, sorry, hate, fuck
neutral: imma, clooney, someone, nba, jump, plan, arrows, clemson, theres, set,
dickens, pick, question, 8th, paterno
positive: wait, thank, nice, thanks, cool, interesting, awesome, amazing, best,
fun, love, good, happy, excited, great
# Total Score: 0.646916565901
precision recall f1-score support
negative 0.69 0.28 0.40 340
neutral 0.63 0.82 0.71 739
positive 0.67 0.64 0.65 575
avg / total 0.65 0.65 0.63 1654
[[ 96 169 75]
[ 24 608 107]
[ 20 189 366]]
######################################################################
######################################################################
# Showing for <methods.maxent.MaxEnt object at 0x9e4bdec>
# Best params: {'vect__ngram_range': (1, 1), 'vect__smooth_idf': True, 'vect__max_df': 0.5, 'vect__sublinear_tf': False, 'vect__preprocessor': <function no_url_usernames_reduced_attached at 0x9e1672c>, 'vect__stop_words': None, 'clf__penalty': 'l1', 'clf__C': 1.0, 'vect__use_idf': True}
# show_most_informative_features:
dimensionality: 7236
density: 0.0506264971439
top 15 keywords per class:
negative: why, lost, didn, damn, cancelled, worst, injury, bad, shit, stupid,
sorry, hate, worse, sad, fuck
neutral: appearance, january, check, international, children, two, pick, at,
plan, arrows, nov, clooney, question, 8th, paterno
positive: glad, greatest, thank, interesting, congrats, thanks, awesome, best,
amazing, fun, love, good, excited, happy, great
# Total Score: 0.641475211608
precision recall f1-score support
negative 0.67 0.23 0.34 340
neutral 0.61 0.87 0.72 739
positive 0.69 0.60 0.64 575
avg / total 0.65 0.64 0.61 1654
[[ 77 187 76]
[ 21 640 78]
[ 17 214 344]]
######################################################################
######################################################################
# Showing for <methods.combination.Combined object at 0x9f5156c>
# show_most_informative_features for Polarity on combined
[-0.06212882 -0.04347488 0.09098882 ..., 0.67282394 -0.20999416
0.0276331 ]
dimensionality: 1
density: 0.998545907769
top 15 keywords per class:
-2.5697 not 2.7939 good
-1.9574 fuck 2.4103 love
-1.8403 why 2.1624 happy
-1.7989 hate 2.0993 best
-1.7396 shit 1.8858 great
-1.6658 sad 1.6519 fun
-1.6458 stupid 1.5616 excited
-1.5309 didn 1.4127 wait
-1.5253 cancelled 1.3962 amazing
-1.5026 wrong 1.3855 better
-1.4734 sorry 1.3765 interesting
-1.4546 injury 1.2625 glad
-1.4524 worst 1.2247 hopefully
-1.4458 missing 1.2146 awesome
-1.4409 no 1.1639 lol
# Total Score: 0.605199516324
precision recall f1-score support
negative 0.66 0.17 0.27 340
neutral 0.58 0.82 0.68 739
positive 0.64 0.59 0.61 575
avg / total 0.62 0.61 0.57 1654
[[ 57 213 70]
[ 16 607 116]
[ 14 224 337]]
######################################################################
######################################################################
# Showing for <methods.combination.Combined object at 0xb2e25ec>
# show_most_informative_features for Polarity on combined
[ 0. 0. 0. ..., 0. 0. 0.]
dimensionality: 1
density: 0.0484860883797
top 15 keywords per class:
-7.3672 not 10.3628 love
-6.1785 injury 8.7270 good
-6.1262 why 8.2148 happy
-5.7627 sad 7.9391 best
-5.7432 hate 7.6175 great
-5.5471 fuck 6.7363 fun
-4.8452 shit 6.5666 excited
-4.5818 cancelled 4.8649 amazing
-4.4967 stupid 3.9584 wait
-4.2441 sorry 3.9357 awesome
-4.1708 worse 3.4419 glad
-4.1161 missing 3.4224 fb
-4.0661 didn 3.2794 cool
-4.0142 no 3.2536 better
-3.9616 wrong 3.1081 nice
# Total Score: 0.600362756953
precision recall f1-score support
negative 0.59 0.14 0.23 340
neutral 0.58 0.82 0.68 739
positive 0.64 0.59 0.61 575
avg / total 0.60 0.60 0.56 1654
[[ 49 213 78]
[ 20 607 112]
[ 14 224 337]]
######################################################################
######################################################################
# Showing for <methods.combination.Combined object at 0x9e4ebec>
# show_most_informative_features for Subjectivity on combined
[ 0.04640777 -0.16217734 -0.12830501 ..., -0.05135439 0. -0.13236336]
dimensionality: 3
density: 0.996795299773
top 15 keywords per class:
-1.4532 love 2.8922 fuck
-1.2100 happy 2.3511 hate
-1.1940 fun 2.3334 sorry
-1.0310 good 2.3275 sad
-1.0152 paris 2.1757 bad
-0.9705 bieber 2.0533 shit
-0.9337 best 1.9960 cancelled
-0.9201 excited 1.9705 stupid
-0.9156 nba 1.9519 worse
-0.9085 august 1.9515 worst
-0.8937 album 1.8483 not
-0.8820 june 1.7233 didn
-0.8772 glad 1.6157 injury
-0.8716 amazing 1.6144 why
-0.8674 hopefully 1.6084 lost
# Total Score: 0.626360338573
precision recall f1-score support
negative 0.64 0.19 0.29 340
neutral 0.63 0.82 0.71 739
positive 0.62 0.63 0.63 575
avg / total 0.63 0.63 0.60 1654
[[ 63 169 108]
[ 15 608 116]
[ 21 189 365]]
######################################################################
######################################################################
# Showing for <methods.combination.Combined object at 0xaa715cc>
# show_most_informative_features for Subjectivity on combined
[ 0.04640777 -0.16217734 -0.12830501 ..., -0.05135439 0. -0.13236336]
dimensionality: 3
density: 0.996795299773
top 15 keywords per class:
-1.4532 love 2.8922 fuck
-1.2100 happy 2.3511 hate
-1.1940 fun 2.3334 sorry
-1.0310 good 2.3275 sad
-1.0152 paris 2.1757 bad
-0.9705 bieber 2.0533 shit
-0.9337 best 1.9960 cancelled
-0.9201 excited 1.9705 stupid
-0.9156 nba 1.9519 worse
-0.9085 august 1.9515 worst
-0.8937 album 1.8483 not
-0.8820 june 1.7233 didn
-0.8772 glad 1.6157 injury
-0.8716 amazing 1.6144 why
-0.8674 hopefully 1.6084 lost
# show_most_informative_features for Polarity on combined
[ 0. 0. 0. ..., 0. 0. 0.]
dimensionality: 1
density: 0.0484860883797
top 15 keywords per class:
-7.3672 not 10.3628 love
-6.1785 injury 8.7270 good
-6.1262 why 8.2148 happy
-5.7627 sad 7.9391 best
-5.7432 hate 7.6175 great
-5.5471 fuck 6.7363 fun
-4.8452 shit 6.5666 excited
-4.5818 cancelled 4.8649 amazing
-4.4967 stupid 3.9584 wait
-4.2441 sorry 3.9357 awesome
-4.1708 worse 3.4419 glad
-4.1161 missing 3.4224 fb
-4.0661 didn 3.2794 cool
-4.0142 no 3.2536 better
-3.9616 wrong 3.1081 nice
# Total Score: 0.63784764208
precision recall f1-score support
negative 0.65 0.25 0.36 340
neutral 0.63 0.82 0.71 739
positive 0.65 0.63 0.64 575
avg / total 0.64 0.64 0.62 1654
[[ 86 169 85]
[ 21 608 110]
[ 25 189 361]]
######################################################################
######################################################################
# Showing for <methods.combination.Combined object at 0xb34484c>
# show_most_informative_features for Subjectivity on combined
[ 0. 0. 0. ..., 0. 0. 0.]
dimensionality: 3
density: 0.0506264971439
top 15 keywords per class:
-6.5565 love 8.0576 fuck
-4.3701 happy 7.6120 sad
-4.1319 at 7.3216 worse
-3.5069 best 7.2494 hate
-3.3410 good 6.9480 sorry
-3.3056 fun 6.5598 stupid
-2.9979 august 6.4242 shit
-2.8863 great 6.3288 bad
-2.7045 excited 5.9489 injury
-2.3548 free 5.8987 worst
-2.3137 november 5.8046 cancelled
-1.9375 come 5.1803 damn
-1.7875 amazing 5.1704 didn
-1.7545 friday 5.0036 lost
-1.7382 there 4.9646 why
# Total Score: 0.626964933495
precision recall f1-score support
negative 0.64 0.16 0.25 340
neutral 0.61 0.87 0.72 739
positive 0.65 0.60 0.62 575
avg / total 0.63 0.63 0.59 1654
[[ 53 187 100]
[ 13 640 86]
[ 17 214 344]]
######################################################################
######################################################################
# Showing for <methods.combination.Combined object at 0xa6dd04c>
# show_most_informative_features for Subjectivity on combined
[ 0. 0. 0. ..., 0. 0. 0.]
dimensionality: 3
density: 0.0506264971439
top 15 keywords per class:
-6.5565 love 8.0576 fuck
-4.3701 happy 7.6120 sad
-4.1319 at 7.3216 worse
-3.5069 best 7.2494 hate
-3.3410 good 6.9480 sorry
-3.3056 fun 6.5598 stupid
-2.9979 august 6.4242 shit
-2.8863 great 6.3288 bad
-2.7045 excited 5.9489 injury
-2.3548 free 5.8987 worst
-2.3137 november 5.8046 cancelled
-1.9375 come 5.1803 damn
-1.7875 amazing 5.1704 didn
-1.7545 friday 5.0036 lost
-1.7382 there 4.9646 why
# show_most_informative_features for Polarity on combined
[-0.06212882 -0.04347488 0.09098882 ..., 0.67282394 -0.20999416
0.0276331 ]
dimensionality: 1
density: 0.998545907769
top 15 keywords per class:
-2.5697 not 2.7939 good
-1.9574 fuck 2.4103 love
-1.8403 why 2.1624 happy
-1.7989 hate 2.0993 best
-1.7396 shit 1.8858 great
-1.6658 sad 1.6519 fun
-1.6458 stupid 1.5616 excited
-1.5309 didn 1.4127 wait
-1.5253 cancelled 1.3962 amazing
-1.5026 wrong 1.3855 better
-1.4734 sorry 1.3765 interesting
-1.4546 injury 1.2625 glad
-1.4524 worst 1.2247 hopefully
-1.4458 missing 1.2146 awesome
-1.4409 no 1.1639 lol
# Total Score: 0.640266021765
precision recall f1-score support
negative 0.67 0.24 0.35 340
neutral 0.61 0.87 0.72 739
positive 0.69 0.59 0.63 575
avg / total 0.65 0.64 0.61 1654
[[ 82 187 71]
[ 17 640 82]
[ 24 214 337]]
######################################################################
Best CLF: <methods.svm.SVM object at 0x9e49fcc>
Best params: {'vect__ngram_range': (1, 1), 'vect__smooth_idf': True, 'vect__max_df': 0.5, 'vect__sublinear_tf': True, 'vect__preprocessor': <function no_usernames at 0x9e16614>, 'vect__stop_words': None, 'vect__use_idf': False, 'clf__C': 0.5}
Score of best CLF: 0.646916565901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment