Skip to content
Permalink
4e6b38c6e6
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
82 lines (71 sloc) 2.46 KB
import numpy
from matplotlib import pyplot
labels = [
"BNB",
"MNB",
"W C",
"TWCNB",
"TF IDF L",
"TF IDF L OvA",
]
tops = numpy.arange(len(labels))
# 0 , movies
# widths = [ 0.789251270916,
# 0.90355565901,
# 0.687274830247,
# 0.858607720931,
# 0.91342342141,
# 0.91342342141 ]
# skew , movies
widths2 = [ 0.139696306725,
0.822764704115,
0.125,
0.125,
0.920448727392,
0.961479550697 ]
# 0 , amazon
# widths3 = [ 0.684270469696,
# 0.792608446831,
# 0.529824561404,
# 0.529824561404,
# 0.798532433585,
# 0.829834039103 ]
# skew , amazon
widths4 = [ 0.298353719071,
0.73741502689,
0.219298245614,
0.219298245614,
0.751207980863,
0.771721619137 ]
# 0 , twitter
# widths5 = [ 0.717525563057,
# 0.840751614224,
# 0.558914441009,
# 0.558667842964,
# 0.849271128435,
# 0.850938806271 ]
# skew , twitter
widths6 = [ 0.584685826487,
0.853741247102,
0.323568358281,
0.323555359506,
0.862090804434,
0.889175806229 ]
height = 0.2
pyplot.barh(tops+height*2, widths2, height, color="#3F681C")
# pyplot.barh(tops+height*4, widths2, height, color="#F17CB0")
pyplot.barh(tops+height*1, widths4, height, color="#5BC8AC")
# pyplot.barh(tops+height*2, widths4, height, color="#60BD68")
pyplot.barh(tops+height*0, widths6, height, color="#CB0000")
# pyplot.barh(tops+height*0, widths6, height, color="#FAA43A")
pyplot.legend(["Movies-skew", "Amazon-skew", "Twitter-skew"], loc=4) # bottom right
pyplot.yticks(tops+height, labels)
pyplot.xlim(0, 1.18)
pyplot.ylim(tops[0]-height, tops[-1]+4*height)
pyplot.show()
"""
gram_length: 1, use_presence: False, use_amazon: False, use_pos_tags: True, use_adj_only: False, use_position: False 0.822003140865
gram_length: 1, use_presence: False, use_amazon: False, use_pos_tags: True, use_adj_only: False, use_position: True 0.781988575402
gram_length: 1, use_presence: False, use_amazon: False, use_pos_tags: True, use_adj_only: True, use_position: False 0.77899606193
gram_length: 1, use_presence: False, use_amazon: False, use_pos_tags: True, use_adj_only: True, use_position: True 0.762512512513
"""