-
Notifications
You must be signed in to change notification settings - Fork 1
/
boxplot.py
57 lines (39 loc) · 1.32 KB
/
boxplot.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
52
53
54
55
56
57
# import seaborn library
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
dataset = pd.read_excel('results.xlsx', sheet_name=10)
# print(dataset.head())
# load the dataset
# data = sns.load_dataset('tips')
# # view the dataset
# print(data.head(5))
data = dataset.query('Sampling == 0 and Metric == "F1"')
# # data = dataset
# data = data.groupby(['Method', 'Metric', 'Sampling']).agg({'Value': ['mean']})
# print(data.head(1000000))
# data_bc = dataset.query('Sampling == 1')
sns.boxplot(x = data['Method'],
y = data['Value'],
hue = data['Classifier'],
palette = 'Greys_r')
# RQ3: multiclass
# data = dataset.query('Metric == "F1" and n == 64')
# data = dataset.query('Metric == "F1" and n == 64')
# sns.boxplot(x = data['Method'],
# y = data['Value'],
# hue = data['Sampling'],
# palette = 'Greys_r')
# data = dataset.query('Sampling == 1')
# data = data.query('Metric == "AUC"')
# sns.boxplot(x = data['Method'],
# y = data['Value'],
# hue = data['n'],
# palette = 'Greys')
# data = dataset.query('Sampling == 0')
# data = data.query('Metric == "AUC"')
# sns.boxplot(x = data['Method'],
# y = data['Value'],
# hue = data['n'],
# palette = 'Greys')
plt.show()