Mercurial > repos > goeckslab > ludwig_visualize
comparison ludwig_visualize.xml @ 0:dceb8493730d draft default tip
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
author | goeckslab |
---|---|
date | Tue, 07 Jan 2025 22:44:54 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:dceb8493730d |
---|---|
1 <tool id="ludwig_visualize" name="Ludwig Visualize" version="@VERSION@" profile="@PROFILE@"> | |
2 <description>analyzes results and shows in plots</description> | |
3 <macros> | |
4 <import>ludwig_macros.xml</import> | |
5 </macros> | |
6 <expand macro="python_requirements_gpu" /> | |
7 <expand macro="macro_stdio" /> | |
8 <version_command>echo "@VERSION@"</version_command> | |
9 <command> | |
10 <![CDATA[ | |
11 #set $visualization = $visualization_selector.visualization.value | |
12 | |
13 mkdir -p "./results" && | |
14 python '$__tool_directory__/ludwig_visualize.py' | |
15 --visualization '$visualization' | |
16 --output_directory "./results" | |
17 #if 'hyperopt_stats_path' in $visualization_selector | |
18 --hyperopt_stats_path '${visualization_selector.hyperopt_stats_path}' | |
19 #end if | |
20 #if 'predictions' in $visualization_selector | |
21 #set $pdns = [x.extra_files_path + '/predictions.parquet' for x in $visualization_selector.predictions] | |
22 #set $predictions = "'" + "' '".join($pdns) + "'" | |
23 --predictions $predictions | |
24 #end if | |
25 #if 'probabilities' in $visualization_selector | |
26 #set $pbts = [x.extra_files_path + '/predictions.parquet' for x in $visualization_selector.probabilities] | |
27 #set $probabilities = "'" + "' '".join($pbts) + "'" | |
28 --probabilities $probabilities | |
29 #end if | |
30 #if 'training_statistics' in $visualization_selector | |
31 #set $ts = [] | |
32 #for $x in $visualization_selector.training_statistics | |
33 #if $x.ext != 'json' | |
34 $ts.append($x.extra_files_path + '/training_statistics.json') | |
35 #else | |
36 $ts.append($x.file_name) | |
37 #end if | |
38 #end for | |
39 #set $training_statistics = "'" + "' '".join($ts) + "'" | |
40 --training_statistics $training_statistics | |
41 #end if | |
42 #if 'test_statistics' in $visualization_selector | |
43 #set $tests = [] | |
44 #for $tx in $visualization_selector.test_statistics | |
45 #if $tx.ext != 'json' | |
46 $tests.append($tx.extra_files_path + '/test_statistics.json') | |
47 #else | |
48 $tests.append($tx.file_name) | |
49 #end if | |
50 #end for | |
51 #set $test_statistics = "'" + "' '".join($tests) + "'" | |
52 --test_statistics $test_statistics | |
53 #end if | |
54 #if 'file_format' in $visualization_selector | |
55 --file_format ${visualization_selector.file_format} | |
56 #end if | |
57 #if 'ground_truth_split' in $visualization_selector | |
58 --ground_truth_split ${visualization_selector.ground_truth_split} | |
59 #end if | |
60 #if 'output_feature_name' in $visualization_selector and $visualization_selector.output_feature_name | |
61 --output_feature_name '${visualization_selector.output_feature_name}' | |
62 #end if | |
63 #if 'model_names' in $visualization_selector and $visualization_selector.model_names | |
64 #set $mns = $visualization_selector.model_names.split(',') | |
65 #set $mns = [x.strip() for x in $mns] | |
66 #set $model_names = "'" + "' '".join($mns) + "'" | |
67 --model_names $model_names | |
68 #end if | |
69 #if 'threshold_output_feature_names' in $visualization_selector | |
70 #set $tofns = $visualization_selector.threshold_output_feature_names.split(',') | |
71 #set $tofns = [x.strip() for x in $tofns] | |
72 #set $threshold_output_feature_names = "'" + "' '".join($tofns) + "'" | |
73 --threshold_output_feature_names $threshold_output_feature_names | |
74 #end if | |
75 #if 'top_n_classes' in $visualization_selector and $visualization_selector.top_n_classes | |
76 #set $tncs = $visualization_selector.top_n_classes.split(',') | |
77 #set $tncs = [x.strip() for x in $tncs] | |
78 #set $top_n_classes = ' '.join($tncs) | |
79 --top_n_classes $top_n_classes | |
80 #end if | |
81 #if 'ground_truth' in $visualization_selector | |
82 --ground_truth '${visualization_selector.ground_truth}' | |
83 #end if | |
84 #if 'ground_truth_metadata' in $visualization_selector | |
85 #if $visualization_selector.ground_truth_metadata.ext == 'json' | |
86 --ground_truth_metadata '${visualization_selector.ground_truth_metadata}' | |
87 #else | |
88 --ground_truth_metadata '${visualization_selector.ground_truth_metadata.extra_files_path}/training_set_metadata.json' | |
89 #end if | |
90 #end if | |
91 #if 'split_file' in $visualization_selector | |
92 --split_file '${visualization_selector.split_file}' | |
93 #end if | |
94 #if 'top_k' in $visualization_selector and $visualization_selector.top_k | |
95 --top_k ${visualization_selector.top_k} | |
96 #end if | |
97 #if 'labels_limit' in $visualization_selector | |
98 --labels_limit ${visualization_selector.labels_limit} | |
99 #end if | |
100 #if 'subset' in $visualization_selector | |
101 --subset ${visualization_selector.subset.value} | |
102 #end if | |
103 #if 'metrics' in $visualization_selector and $visualization_selector.metrics | |
104 #set $mtcs = $visualization_selector.metrics.split(',') | |
105 #set $mtcs = [x.strip() for x in $mtcs] | |
106 #set $metrics = "'" + "' '".join($mtcs) + "'" | |
107 --metrics ${visualization_selector.metrics} | |
108 #end if | |
109 #if 'positive_label' in $visualization_selector | |
110 --positive_label ${visualization_selector.positive_label} | |
111 #end if | |
112 #if 'normalize' in $visualization_selector and $visualization_selector.normalize | |
113 --normalize | |
114 #end if | |
115 && echo "Done!" | |
116 ]]> | |
117 </command> | |
118 <configfiles> | |
119 <inputs name="inputs" /> | |
120 </configfiles> | |
121 <inputs> | |
122 <conditional name="visualization_selector"> | |
123 <param name="visualization" type="select" label="Type of visualization"> | |
124 <option value="compare_performance">compare_performance</option> | |
125 <option value="compare_classifiers_performance_from_prob">compare_classifiers_performance_from_prob</option> | |
126 <option value="compare_classifiers_performance_from_pred">compare_classifiers_performance_from_pred</option> | |
127 <option value="compare_classifiers_performance_subset">compare_classifiers_performance_subset</option> | |
128 <option value="compare_classifiers_performance_changing_k">compare_classifiers_performance_changing_k</option> | |
129 <option value="compare_classifiers_multiclass_multimetric">compare_classifiers_multiclass_multimetric</option> | |
130 <option value="compare_classifiers_predictions">compare_classifiers_predictions</option> | |
131 <option value="compare_classifiers_predictions_distribution">compare_classifiers_predictions_distribution</option> | |
132 <option value="confidence_thresholding">confidence_thresholding</option> | |
133 <option value="confidence_thresholding_data_vs_acc">confidence_thresholding_data_vs_acc</option> | |
134 <option value="confidence_thresholding_data_vs_acc_subset">confidence_thresholding_data_vs_acc_subset</option> | |
135 <option value="confidence_thresholding_data_vs_acc_subset_per_class">confidence_thresholding_data_vs_acc_subset_per_class</option> | |
136 <option value="confidence_thresholding_2thresholds_2d">confidence_thresholding_2thresholds_2d</option> | |
137 <option value="confidence_thresholding_2thresholds_3d">confidence_thresholding_2thresholds_3d</option> | |
138 <option value="binary_threshold_vs_metric">binary_threshold_vs_metric</option> | |
139 <option value="roc_curves">roc_curves</option> | |
140 <option value="roc_curves_from_test_statistics">roc_curves_from_test_statistics</option> | |
141 <option value="calibration_1_vs_all">calibration_1_vs_all</option> | |
142 <option value="calibration_multiclass">calibration_multiclass</option> | |
143 <option value="confusion_matrix">confusion_matrix</option> | |
144 <option value="frequency_vs_f1">frequency_vs_f1</option> | |
145 <option value="learning_curves">learning_curves</option> | |
146 <option value="hyperopt_report" selected="true">hyperopt_report</option> | |
147 <option value="hyperopt_hiplot">hyperopt_hiplot</option> | |
148 </param> | |
149 <when value="compare_performance"> | |
150 <expand macro="visualize_test_statistics" /> | |
151 <expand macro="visualize_output_feature_name" /> | |
152 <expand macro="visualize_model_names" /> | |
153 <expand macro="visualize_file_format" /> | |
154 </when> | |
155 <when value="compare_classifiers_performance_from_prob"> | |
156 <expand macro="visualize_probabilities" /> | |
157 <expand macro="visualize_ground_truth" /> | |
158 <expand macro="visualize_ground_truth_split" /> | |
159 <expand macro="visualize_split_file" /> | |
160 <expand macro="visualize_ground_truth_metadata" /> | |
161 <expand macro="visualize_output_feature_name" /> | |
162 </when> | |
163 <when value="compare_classifiers_performance_from_pred"> | |
164 <expand macro="visualize_predictions" /> | |
165 <expand macro="visualize_ground_truth" /> | |
166 <expand macro="visualize_ground_truth_split" /> | |
167 <expand macro="visualize_split_file" /> | |
168 <expand macro="visualize_ground_truth_metadata" /> | |
169 <expand macro="visualize_output_feature_name" /> | |
170 </when> | |
171 <when value="compare_classifiers_performance_subset"> | |
172 <expand macro="visualize_probabilities" /> | |
173 <expand macro="visualize_ground_truth" /> | |
174 <expand macro="visualize_ground_truth_split" /> | |
175 <expand macro="visualize_split_file" /> | |
176 <expand macro="visualize_ground_truth_metadata" /> | |
177 <expand macro="visualize_output_feature_name" /> | |
178 </when> | |
179 <when value="compare_classifiers_performance_changing_k"> | |
180 <expand macro="visualize_probabilities" /> | |
181 <expand macro="visualize_ground_truth" /> | |
182 <expand macro="visualize_ground_truth_split" /> | |
183 <expand macro="visualize_split_file" /> | |
184 <expand macro="visualize_ground_truth_metadata" /> | |
185 <expand macro="visualize_output_feature_name" /> | |
186 </when> | |
187 <when value="compare_classifiers_multiclass_multimetric"> | |
188 <expand macro="visualize_test_statistics" /> | |
189 <expand macro="visualize_ground_truth_metadata" /> | |
190 <expand macro="visualize_output_feature_name" /> | |
191 <expand macro="visualize_top_n_classes" /> | |
192 <expand macro="visualize_model_names" /> | |
193 <expand macro="visualize_file_format" /> | |
194 </when> | |
195 <when value="compare_classifiers_predictions"> | |
196 <expand macro="visualize_predictions" /> | |
197 <expand macro="visualize_ground_truth" /> | |
198 <expand macro="visualize_ground_truth_split" /> | |
199 <expand macro="visualize_split_file" /> | |
200 <expand macro="visualize_ground_truth_metadata" /> | |
201 <expand macro="visualize_output_feature_name" /> | |
202 </when> | |
203 <when value="compare_classifiers_predictions_distribution"> | |
204 <expand macro="visualize_predictions" /> | |
205 <expand macro="visualize_ground_truth" /> | |
206 <expand macro="visualize_ground_truth_split" /> | |
207 <expand macro="visualize_split_file" /> | |
208 <expand macro="visualize_ground_truth_metadata" /> | |
209 <expand macro="visualize_output_feature_name" /> | |
210 </when> | |
211 <when value="confidence_thresholding"> | |
212 <expand macro="visualize_probabilities" /> | |
213 <expand macro="visualize_ground_truth" /> | |
214 <expand macro="visualize_ground_truth_split" /> | |
215 <expand macro="visualize_split_file" /> | |
216 <expand macro="visualize_ground_truth_metadata" /> | |
217 <expand macro="visualize_output_feature_name" /> | |
218 </when> | |
219 <when value="confidence_thresholding_data_vs_acc"> | |
220 <expand macro="visualize_probabilities" /> | |
221 <expand macro="visualize_ground_truth" /> | |
222 <expand macro="visualize_ground_truth_split" /> | |
223 <expand macro="visualize_split_file" /> | |
224 <expand macro="visualize_ground_truth_metadata" /> | |
225 <expand macro="visualize_output_feature_name" /> | |
226 </when> | |
227 <when value="confidence_thresholding_data_vs_acc_subset"> | |
228 <expand macro="visualize_probabilities" /> | |
229 <expand macro="visualize_ground_truth" /> | |
230 <expand macro="visualize_ground_truth_split" /> | |
231 <expand macro="visualize_split_file" /> | |
232 <expand macro="visualize_ground_truth_metadata" /> | |
233 <expand macro="visualize_output_feature_name" /> | |
234 </when> | |
235 <when value="confidence_thresholding_data_vs_acc_subset_per_class"> | |
236 <expand macro="visualize_probabilities" /> | |
237 <expand macro="visualize_ground_truth" /> | |
238 <expand macro="visualize_ground_truth_split" /> | |
239 <expand macro="visualize_split_file" /> | |
240 <expand macro="visualize_ground_truth_metadata" /> | |
241 <expand macro="visualize_output_feature_name" /> | |
242 </when> | |
243 <when value="confidence_thresholding_2thresholds_2d"> | |
244 <expand macro="visualize_probabilities" /> | |
245 <expand macro="visualize_ground_truth" /> | |
246 <expand macro="visualize_ground_truth_split" /> | |
247 <expand macro="visualize_split_file" /> | |
248 <expand macro="visualize_ground_truth_metadata" /> | |
249 <expand macro="visualize_threshold_output_feature_names" /> | |
250 <expand macro="visualize_labels_limit" /> | |
251 <expand macro="visualize_model_names" /> | |
252 <expand macro="visualize_file_format" /> | |
253 </when> | |
254 <when value="confidence_thresholding_2thresholds_3d"> | |
255 <expand macro="visualize_probabilities" /> | |
256 <expand macro="visualize_ground_truth" /> | |
257 <expand macro="visualize_ground_truth_split" /> | |
258 <expand macro="visualize_split_file" /> | |
259 <expand macro="visualize_ground_truth_metadata" /> | |
260 <expand macro="visualize_threshold_output_feature_names" /> | |
261 <expand macro="visualize_labels_limit" /> | |
262 <expand macro="visualize_file_format" /> | |
263 </when> | |
264 <when value="binary_threshold_vs_metric"> | |
265 <expand macro="visualize_probabilities" /> | |
266 <expand macro="visualize_ground_truth" /> | |
267 <expand macro="visualize_ground_truth_split" /> | |
268 <expand macro="visualize_split_file" /> | |
269 <expand macro="visualize_ground_truth_metadata" /> | |
270 <expand macro="visualize_output_feature_name" /> | |
271 <expand macro="visualize_metrics" /> | |
272 <expand macro="visualize_positive_label" /> | |
273 <expand macro="visualize_model_names" /> | |
274 <expand macro="visualize_file_format" /> | |
275 </when> | |
276 <when value="roc_curves"> | |
277 <expand macro="visualize_probabilities" /> | |
278 <expand macro="visualize_ground_truth" /> | |
279 <expand macro="visualize_ground_truth_split" /> | |
280 <expand macro="visualize_split_file" /> | |
281 <expand macro="visualize_ground_truth_metadata" /> | |
282 <expand macro="visualize_output_feature_name" /> | |
283 <expand macro="visualize_positive_label" /> | |
284 <expand macro="visualize_model_names" /> | |
285 <expand macro="visualize_file_format" /> | |
286 </when> | |
287 <when value="roc_curves_from_test_statistics"> | |
288 <expand macro="visualize_test_statistics" /> | |
289 <expand macro="visualize_output_feature_name" /> | |
290 <expand macro="visualize_model_names" /> | |
291 <expand macro="visualize_file_format" /> | |
292 </when> | |
293 <when value="calibration_1_vs_all"> | |
294 <expand macro="visualize_probabilities" /> | |
295 <expand macro="visualize_ground_truth" /> | |
296 <expand macro="visualize_ground_truth_split" /> | |
297 <expand macro="visualize_split_file" /> | |
298 <expand macro="visualize_ground_truth_metadata" /> | |
299 <expand macro="visualize_output_feature_name" /> | |
300 <expand macro="visualize_ground_truth_apply_idx" /> | |
301 </when> | |
302 <when value="calibration_multiclass"> | |
303 <expand macro="visualize_probabilities" /> | |
304 <expand macro="visualize_ground_truth" /> | |
305 <expand macro="visualize_ground_truth_split" /> | |
306 <expand macro="visualize_split_file" /> | |
307 <expand macro="visualize_ground_truth_metadata" /> | |
308 <expand macro="visualize_output_feature_name" /> | |
309 <expand macro="visualize_labels_limit" /> | |
310 <expand macro="visualize_model_names" /> | |
311 <expand macro="visualize_file_format" /> | |
312 <expand macro="visualize_ground_truth_apply_idx" /> | |
313 </when> | |
314 <when value="confusion_matrix"> | |
315 <expand macro="visualize_test_statistics" /> | |
316 <expand macro="visualize_ground_truth_metadata" /> | |
317 <expand macro="visualize_output_feature_name" /> | |
318 <expand macro="visualize_top_n_classes" /> | |
319 <expand macro="visualize_normalize" /> | |
320 <expand macro="visualize_model_names" /> | |
321 <expand macro="visualize_file_format" /> | |
322 </when> | |
323 <when value="frequency_vs_f1"> | |
324 <expand macro="visualize_test_statistics" /> | |
325 <expand macro="visualize_ground_truth_metadata" /> | |
326 <expand macro="visualize_output_feature_name" /> | |
327 <expand macro="visualize_top_n_classes" /> | |
328 <expand macro="visualize_model_names" /> | |
329 <expand macro="visualize_file_format" /> | |
330 </when> | |
331 <when value="learning_curves"> | |
332 <expand macro="visualize_training_statistics" /> | |
333 <expand macro="visualize_output_feature_name" /> | |
334 <expand macro="visualize_model_names" /> | |
335 <expand macro="visualize_file_format" /> | |
336 </when> | |
337 <when value="hyperopt_report"> | |
338 <expand macro="visualize_hyperopt_stats_path" /> | |
339 <expand macro="visualize_file_format" /> | |
340 </when> | |
341 <when value="hyperopt_hiplot"> | |
342 <expand macro="visualize_hyperopt_stats_path" /> | |
343 </when> | |
344 </conditional> | |
345 </inputs> | |
346 <outputs> | |
347 <collection type="list" name="output" label="${tool.name} ${visualization_selector.visualization} on ${on_string}"> | |
348 <discover_datasets pattern="(?P<designation>.+)\.pdf" format="pdf" directory="results" /> | |
349 <discover_datasets pattern="(?P<designation>.+)\.png" format="png" directory="results" /> | |
350 </collection> | |
351 </outputs> | |
352 <tests> | |
353 <test> | |
354 <conditional name="visualization_selector"> | |
355 <param name="visualization" value="hyperopt_report" /> | |
356 <param name="hyperopt_stats_path" value="temperature_hyperopt_statistics.json" ftype="json" /> | |
357 <param name="file_type" value="pdf" /> | |
358 </conditional> | |
359 <output_collection name="output" type="list"> | |
360 <element name="hyperopt_trainer.learning_rate" file="temp_hyperopt_training.learning_rate.pdf" ftype="pdf" /> | |
361 </output_collection> | |
362 </test> | |
363 </tests> | |
364 <help> | |
365 <![CDATA[ | |
366 **What it does** | |
367 This tool supports various of visualizations from Ludwig. | |
368 | |
369 | |
370 **Input** | |
371 Report output from ludwig train/experiment/evaluate/predict tool. | |
372 | |
373 | |
374 **Output** | |
375 PNG or PDF. | |
376 | |
377 | |
378 ]]> | |
379 </help> | |
380 <expand macro="macro_citations" /> | |
381 </tool> |