forked from Seanny123/DeepSLAM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_averages.py
51 lines (45 loc) · 1.7 KB
/
plot_averages.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Create the bar chart for the averaging comparison
import numpy as np
import ipdb
import sys
import cPickle as pickle
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
sns.set(font_scale=1.5)
layer_names=['GoogleNet Layer 1', 'AlexNet Layer 2',
'OverFeat Average', 'All Layers',
'Best Combination']
results = pd.DataFrame()
results = results.append({
'Layer': layer_names[0],
'F1 Score': 0.85260511883,
'Boosted': True,
}, ignore_index=True)
results = results.append({
'Layer': layer_names[1],
'F1 Score': 0.841242350768,
'Boosted': True,
}, ignore_index=True)
results = results.append({
'Layer': layer_names[2],
'F1 Score': 0.783751493429,
'Boosted': True,
}, ignore_index=True)
results = results.append({
'Layer': layer_names[3],
'F1 Score': 0.870800450958,
'Boosted': True,
}, ignore_index=True)
results = results.append({
'Layer': layer_names[4],
'F1 Score': 0.882036331016,
'Boosted': True,
}, ignore_index=True)
bar = sns.factorplot('Layer', 'F1 Score', data=results,
kind='bar', size=8, legend=False,
order=layer_names)
axes = bar.axes[0,0]
axes.set_title('Combined Improvement')
axes.set_ylim(0.7,0.9)
plt.show()