Merge branch 'master' of http://pakal.ccg.unam.mx/cmendezc/automatic-extraction-growth-conditions
Showing
5 changed files
with
214 additions
and
4 deletions
... | @@ -7,6 +7,7 @@ library(ggplot2) | ... | @@ -7,6 +7,7 @@ library(ggplot2) |
7 | ######### BEST MODELS ########## | 7 | ######### BEST MODELS ########## |
8 | 8 | ||
9 | # Run1 | 9 | # Run1 |
10 | +# Todas las condiciones | ||
10 | dfa <- data.frame(Measure=rep(c("Precision", "Recall", "F1-score"), each=15), | 11 | dfa <- data.frame(Measure=rep(c("Precision", "Recall", "F1-score"), each=15), |
11 | Strategy=rep(c( | 12 | Strategy=rep(c( |
12 | "Agit", | 13 | "Agit", |
... | @@ -72,15 +73,142 @@ dfa <- data.frame(Measure=rep(c("Precision", "Recall", "F1-score"), each=15), | ... | @@ -72,15 +73,142 @@ dfa <- data.frame(Measure=rep(c("Precision", "Recall", "F1-score"), each=15), |
72 | 1, | 73 | 1, |
73 | 1 | 74 | 1 |
74 | )) | 75 | )) |
75 | -head(dfa) | ||
76 | 76 | ||
77 | -pa<-ggplot(dfa, aes(x=Strategy, y=Score, group=Measure)) + | 77 | +# Solo condiciones con F1-score > 0 |
78 | +# Run 1 | ||
79 | +df <- data.frame(Measure=rep(c("Precision", "Recall", "F1-score"), each=11), | ||
80 | + Strategy=rep(c( | ||
81 | + "OD", | ||
82 | + "Anti", | ||
83 | + "Supp", | ||
84 | + "Air", | ||
85 | + "Gtype", | ||
86 | + "Med", | ||
87 | + "Temp", | ||
88 | + "Technique", | ||
89 | + "Phase", | ||
90 | + "pH", | ||
91 | + "Strain" | ||
92 | + ),3), | ||
93 | + Score=c( | ||
94 | + 1, | ||
95 | + 1, | ||
96 | + 0.883, | ||
97 | + 0.92, | ||
98 | + 0.905, | ||
99 | + 0.852, | ||
100 | + 0.818, | ||
101 | + 0.88, | ||
102 | + 1, | ||
103 | + 1, | ||
104 | + 1, | ||
105 | + 0.405, | ||
106 | + 0.444, | ||
107 | + 0.669, | ||
108 | + 0.742, | ||
109 | + 0.811, | ||
110 | + 0.912, | ||
111 | + 1, | ||
112 | + 1, | ||
113 | + 0.947, | ||
114 | + 1, | ||
115 | + 1, | ||
116 | + 0.577, | ||
117 | + 0.615, | ||
118 | + 0.762, | ||
119 | + 0.821, | ||
120 | + 0.856, | ||
121 | + 0.881, | ||
122 | + 0.9, | ||
123 | + 0.936, | ||
124 | + 0.973, | ||
125 | + 1, | ||
126 | + 1 | ||
127 | + )) | ||
128 | + | ||
129 | +head(df) | ||
130 | + | ||
131 | +pa<-ggplot(df, aes(x=Strategy, y=Score, group=Measure)) + | ||
132 | + geom_line(aes(color=Measure))+ | ||
133 | + geom_point(aes(color=Measure))+ | ||
134 | + scale_color_manual(values=c("#999999", "#E69F00", "#56B4E9"))+ | ||
135 | + #scale_color_manual(values=c("#e6194b", "#3cb44b", "#0082c8"))+ | ||
136 | + #geom_text(aes(label = Score))+ | ||
137 | + labs(title="Scores by condition (Best model, Run1)",x="Condition", y = "Score")+ | ||
138 | + theme( | ||
139 | + legend.position="top", | ||
140 | + # Centrar título: plot.title = element_text(hjust = 0.5), | ||
141 | + axis.line = element_line(colour = "gray"), | ||
142 | + panel.background = element_blank(), | ||
143 | + panel.grid.major = element_blank(), | ||
144 | + panel.grid.minor = element_blank(), | ||
145 | + panel.border = element_blank() | ||
146 | + ) | ||
147 | +pa | ||
148 | + | ||
149 | +ggsave(".png") | ||
150 | + | ||
151 | +# Solo condiciones con F1-score > 0 | ||
152 | +# Run 7 | ||
153 | +df <- data.frame(Measure=rep(c("Precision", "Recall", "F1-score"), each=11), | ||
154 | + Strategy=rep(c( | ||
155 | + "Anti", | ||
156 | + "OD", | ||
157 | + "Supp", | ||
158 | + "Air", | ||
159 | + "Gtype", | ||
160 | + "Temp", | ||
161 | + "Med", | ||
162 | + "Technique", | ||
163 | + "Phase", | ||
164 | + "pH", | ||
165 | + "Strain" | ||
166 | + ),3), | ||
167 | + Score=c( | ||
168 | + 0.571, | ||
169 | + 1, | ||
170 | + 0.886, | ||
171 | + 0.939, | ||
172 | + 0.876, | ||
173 | + 0.818, | ||
174 | + 0.897, | ||
175 | + 0.952, | ||
176 | + 1, | ||
177 | + 1, | ||
178 | + 1, | ||
179 | + 0.444, | ||
180 | + 0.405, | ||
181 | + 0.684, | ||
182 | + 0.742, | ||
183 | + 0.802, | ||
184 | + 1, | ||
185 | + 0.912, | ||
186 | + 0.909, | ||
187 | + 0.947, | ||
188 | + 1, | ||
189 | + 1, | ||
190 | + 0.5, | ||
191 | + 0.577, | ||
192 | + 0.772, | ||
193 | + 0.829, | ||
194 | + 0.837, | ||
195 | + 0.9, | ||
196 | + 0.904, | ||
197 | + 0.93, | ||
198 | + 0.973, | ||
199 | + 1, | ||
200 | + 1 | ||
201 | + )) | ||
202 | + | ||
203 | +head(df) | ||
204 | + | ||
205 | +pa<-ggplot(df, aes(x=Strategy, y=Score, group=Measure)) + | ||
78 | geom_line(aes(color=Measure))+ | 206 | geom_line(aes(color=Measure))+ |
79 | geom_point(aes(color=Measure))+ | 207 | geom_point(aes(color=Measure))+ |
80 | scale_color_manual(values=c("#999999", "#E69F00", "#56B4E9"))+ | 208 | scale_color_manual(values=c("#999999", "#E69F00", "#56B4E9"))+ |
81 | #scale_color_manual(values=c("#e6194b", "#3cb44b", "#0082c8"))+ | 209 | #scale_color_manual(values=c("#e6194b", "#3cb44b", "#0082c8"))+ |
82 | - geom_text(aes(label = Score))+ | 210 | + #geom_text(aes(label = Score))+ |
83 | - labs(title="Prediction of the best model (Run1)",x="Conditions", y = "Score")+ | 211 | + labs(title="Scores by condition (Best model, Run7)",x="Condition", y = "Score")+ |
84 | theme( | 212 | theme( |
85 | legend.position="top", | 213 | legend.position="top", |
86 | # Centrar título: plot.title = element_text(hjust = 0.5), | 214 | # Centrar título: plot.title = element_text(hjust = 0.5), | ... | ... |
CRF/figures/line-plots-CRF-v2.0.R
0 → 100644
1 | +# Based on http://www.sthda.com/english/wiki/ggplot2-line-plot-quick-start-guide-r-software-and-data-visualization | ||
2 | + | ||
3 | +library(ggplot2) | ||
4 | +#library(ggpubr) | ||
5 | +#library(cowplot) | ||
6 | + | ||
7 | +######### BEST MODEL ########## | ||
8 | + | ||
9 | +# Solo condiciones con F1-score > 0 | ||
10 | +# Run 6 (report_Run6_v11.txt) | ||
11 | +df <- data.frame(Measure=rep(c("Precision", "Recall", "F1-score"), each=11), | ||
12 | + Strategy=rep(c( | ||
13 | + "Air", | ||
14 | + "Anti", | ||
15 | + "Gtype", | ||
16 | + "Med", | ||
17 | + "OD", | ||
18 | + "pH", | ||
19 | + "Phase", | ||
20 | + "Supp", | ||
21 | + "Technique", | ||
22 | + "Temp", | ||
23 | + "Vess" | ||
24 | + ),3), | ||
25 | + Score=c( | ||
26 | + 0.565, | ||
27 | + 1, | ||
28 | + 0.889, | ||
29 | + 1, | ||
30 | + 1, | ||
31 | + 1, | ||
32 | + 0.882, | ||
33 | + 0.811, | ||
34 | + 1, | ||
35 | + 0.923, | ||
36 | + 1, | ||
37 | + 0.377, | ||
38 | + 1, | ||
39 | + 0.847, | ||
40 | + 0.943, | ||
41 | + 0.818, | ||
42 | + 1, | ||
43 | + 1, | ||
44 | + 0.799, | ||
45 | + 0.913, | ||
46 | + 0.828, | ||
47 | + 1, | ||
48 | + 0.452, | ||
49 | + 1, | ||
50 | + 0.867, | ||
51 | + 0.971, | ||
52 | + 0.9, | ||
53 | + 1, | ||
54 | + 0.938, | ||
55 | + 0.805, | ||
56 | + 0.955, | ||
57 | + 0.873, | ||
58 | + 1 | ||
59 | + )) | ||
60 | + | ||
61 | +head(df) | ||
62 | + | ||
63 | +pa<-ggplot(df, aes(x=Strategy, y=Score, group=Measure)) + | ||
64 | + geom_line(aes(color=Measure))+ | ||
65 | + geom_point(aes(color=Measure))+ | ||
66 | + scale_color_manual(values=c("#999999", "#E69F00", "#56B4E9"))+ | ||
67 | + #scale_color_manual(values=c("#e6194b", "#3cb44b", "#0082c8"))+ | ||
68 | + #geom_text(aes(label = Score))+ | ||
69 | + labs(title="Scores by condition (Best model, Run1)",x="Condition", y = "Score")+ | ||
70 | + theme( | ||
71 | + legend.position="top", | ||
72 | + # Centrar título: plot.title = element_text(hjust = 0.5), | ||
73 | + axis.line = element_line(colour = "gray"), | ||
74 | + panel.background = element_blank(), | ||
75 | + panel.grid.major = element_blank(), | ||
76 | + panel.grid.minor = element_blank(), | ||
77 | + panel.border = element_blank() | ||
78 | + ) | ||
79 | +pa | ||
80 | + | ||
81 | +ggsave(".png") | ||
82 | + |
CRF/figures/scores-by-condition-Run6.jpeg
0 → 100644

73.2 KB
CRF/reports/resultados_v1.xlsx
0 → 100644
No preview for this file type
CRF/reports/resultados_v2.xlsx
0 → 100644
No preview for this file type
-
Please register or login to post a comment