line-plots-CRF.R
2.46 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Based on http://www.sthda.com/english/wiki/ggplot2-line-plot-quick-start-guide-r-software-and-data-visualization
library(ggplot2)
#library(ggpubr)
#library(cowplot)
######### BEST MODELS ##########
# Run1
dfa <- data.frame(Measure=rep(c("Precision", "Recall", "F1-score"), each=15),
Strategy=rep(c(
"Agit",
"Gversion",
"Substrain",
"Vess",
"OD",
"Anti",
"Supp",
"Air",
"Gtype",
"Med",
"Temp",
"Technique",
"Phase",
"pH",
"Strain"
),3),
Score=c(
0,
0,
0,
0,
1,
1,
0.883,
0.92,
0.905,
0.852,
0.818,
0.88,
1,
1,
1,
0,
0,
0,
0,
0.405,
0.444,
0.669,
0.742,
0.811,
0.912,
1,
1,
0.947,
1,
1,
0,
0,
0,
0,
0.577,
0.615,
0.762,
0.821,
0.856,
0.881,
0.9,
0.936,
0.973,
1,
1
))
head(dfa)
pa<-ggplot(dfa, aes(x=Strategy, y=Score, group=Measure)) +
geom_line(aes(color=Measure))+
geom_point(aes(color=Measure))+
scale_color_manual(values=c("#999999", "#E69F00", "#56B4E9"))+
#scale_color_manual(values=c("#e6194b", "#3cb44b", "#0082c8"))+
geom_text(aes(label = Score))+
labs(title="Prediction of the best model (Run1)",x="Conditions", y = "Score")+
theme(
legend.position="top",
# Centrar título: plot.title = element_text(hjust = 0.5),
axis.line = element_line(colour = "gray"),
panel.background = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.border = element_blank()
)
pa
ggsave(".png")