comparison ml_visualization_ex.xml @ 8:6cf6f27547cb draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit e2a5eade6d0e5ddf3a47630381a0ad90d80e8a04"
author bgruening
date Tue, 13 Apr 2021 19:09:17 +0000
parents 222c02df5d55
children 9c19cf3c4ea0
comparison
equal deleted inserted replaced
7:05143043ca13 8:6cf6f27547cb
1 <tool id="ml_visualization_ex" name="Machine Learning Visualization Extension" version="@VERSION@"> 1 <tool id="ml_visualization_ex" name="Machine Learning Visualization Extension" version="@VERSION@" profile="20.05">
2 <description>includes several types of plotting for machine learning</description> 2 <description>includes several types of plotting for machine learning</description>
3 <macros> 3 <macros>
4 <import>main_macros.xml</import> 4 <import>main_macros.xml</import>
5 <import>keras_macros.xml</import> 5 <import>keras_macros.xml</import>
6 </macros> 6 </macros>
7 <expand macro="python_requirements"/> 7 <expand macro="python_requirements" />
8 <expand macro="macro_stdio"/> 8 <expand macro="macro_stdio" />
9 <version_command>echo "@VERSION@"</version_command> 9 <version_command>echo "@VERSION@"</version_command>
10 <command> 10 <command>
11 <![CDATA[ 11 <![CDATA[
12 python '$__tool_directory__/ml_visualization_ex.py' 12 python '$__tool_directory__/ml_visualization_ex.py'
13 --inputs '$inputs' 13 --inputs '$inputs'
42 <option value="feature_importances">Feature Importances plot</option> 42 <option value="feature_importances">Feature Importances plot</option>
43 <option value="keras_plot_model">keras plot model - plot configuration of a neural network model</option> 43 <option value="keras_plot_model">keras plot model - plot configuration of a neural network model</option>
44 <option value="classification_confusion_matrix">Confusion matrix for classes</option> 44 <option value="classification_confusion_matrix">Confusion matrix for classes</option>
45 </param> 45 </param>
46 <when value="learning_curve"> 46 <when value="learning_curve">
47 <param name="infile1" type="data" format="tabular" label="Select the dataset containing values for plotting learning curve." help="This dataset should be the output of tool model_validation->learning_curve."/> 47 <param name="infile1" type="data" format="tabular" label="Select the dataset containing values for plotting learning curve." help="This dataset should be the output of tool model_validation->learning_curve." />
48 <param name="plot_std_err" type="boolean" truevalue="booltrue" falsevalue="boolfalse" optional="true" checked="false" label="Whether to plot standard error bar?"/> 48 <param name="plot_std_err" type="boolean" truevalue="booltrue" falsevalue="boolfalse" optional="true" checked="false" label="Whether to plot standard error bar?" />
49 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired."/> 49 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired." />
50 <param name="plot_format" type="select" label="The output format and library"> 50 <param name="plot_format" type="select" label="The output format and library">
51 <option value="html" selected="true">An interactive html by plotly</option> 51 <option value="html" selected="true">An interactive html by plotly</option>
52 <!--<option value="png">PNG image by matplotlib</option> TODO--> 52 <!--<option value="png">PNG image by matplotlib</option> TODO-->
53 </param> 53 </param>
54 </when> 54 </when>
55 <when value="pr_curve"> 55 <when value="pr_curve">
56 <param name="infile1" type="data" format="tabular" label="Select the dataset containing true labels." help="y_true. Headered. For 2-class, single column contains both class labels (e.g. True and False). For multi-label, each column, hot-encoded, corresponds to one label."/> 56 <param name="infile1" type="data" format="tabular" label="Select the dataset containing true labels." help="y_true. Headered. For 2-class, single column contains both class labels (e.g. True and False). For multi-label, each column, hot-encoded, corresponds to one label." />
57 <param name="infile2" type="data" format="tabular" label="Select the dataset containing predicted probabilities." help="y_preds. Headered. For 2-class, sinle column or the first column contains scores for the positive label. For multi-label, each column corresponds to one label."/> 57 <param name="infile2" type="data" format="tabular" label="Select the dataset containing predicted probabilities." help="y_preds. Headered. For 2-class, sinle column or the first column contains scores for the positive label. For multi-label, each column corresponds to one label." />
58 <param name="pos_label" type="text" value="" optional="true" label="pos_label" help="The label of positive class. If not specified, it will be 1 by default."/> 58 <param name="pos_label" type="text" value="" optional="true" label="pos_label" help="The label of positive class. If not specified, it will be 1 by default." />
59 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired."/> 59 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired." />
60 <param name="report_minimum_n_positives" type="integer" value="" optional="true" label="Report minimum number of positives" help="For mulitple label binary classifications, whose number of true postives is less than the threhold will be ignored."/> 60 <param name="report_minimum_n_positives" type="integer" value="" optional="true" label="Report minimum number of positives" help="For mulitple label binary classifications, whose number of true postives is less than the threhold will be ignored." />
61 <param name="plot_format" type="select" label="The output format and library"> 61 <param name="plot_format" type="select" label="The output format and library">
62 <option value="plotly_html" selected="true">An interactive html by plotly</option> 62 <option value="plotly_html" selected="true">An interactive html by plotly</option>
63 <option value="matplotlib_svg">SVG image by matplotlib</option> 63 <option value="matplotlib_svg">SVG image by matplotlib</option>
64 </param> 64 </param>
65 </when> 65 </when>
66 <when value="roc_curve"> 66 <when value="roc_curve">
67 <param name="infile1" type="data" format="tabular" label="Select the dataset containing true labels." help="y_true. Headered. For 2-class, single column contains both class labels (e.g. True and False). For multi-label, each column, hot-encoded, corresponds to one label."/> 67 <param name="infile1" type="data" format="tabular" label="Select the dataset containing true labels." help="y_true. Headered. For 2-class, single column contains both class labels (e.g. True and False). For multi-label, each column, hot-encoded, corresponds to one label." />
68 <param name="infile2" type="data" format="tabular" label="Select the dataset containing predicted probabilities." help="y_preds. Headered. For 2-class, sinle column or the first column contains scores for the positive label. For multi-label, each column corresponds to one label."/> 68 <param name="infile2" type="data" format="tabular" label="Select the dataset containing predicted probabilities." help="y_preds. Headered. For 2-class, sinle column or the first column contains scores for the positive label. For multi-label, each column corresponds to one label." />
69 <param name="pos_label" type="text" value="" optional="true" label="pos_label" help="The label of positive class. If not specified, it will be 1 by default."/> 69 <param name="pos_label" type="text" value="" optional="true" label="pos_label" help="The label of positive class. If not specified, it will be 1 by default." />
70 <param name="drop_intermediate" type="boolean" truevalue="booltrue" falsevalue="boolfalse" optional="true" checked="true" label="drop_intermediate" help="Whether to drop some suboptimal thresholds which would not appear on a plotted ROC curve."/> 70 <param name="drop_intermediate" type="boolean" truevalue="booltrue" falsevalue="boolfalse" optional="true" checked="true" label="drop_intermediate" help="Whether to drop some suboptimal thresholds which would not appear on a plotted ROC curve." />
71 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired."/> 71 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired." />
72 <param name="report_minimum_n_positives" type="integer" value="" optional="true" label="Report minimum number of positives" help="For mulitple label binary classifications, whose number of true postives is less than the threhold will be ignored."/> 72 <param name="report_minimum_n_positives" type="integer" value="" optional="true" label="Report minimum number of positives" help="For mulitple label binary classifications, whose number of true postives is less than the threhold will be ignored." />
73 <param name="plot_format" type="select" label="The output format and library"> 73 <param name="plot_format" type="select" label="The output format and library">
74 <option value="plotly_html" selected="true">An interactive html by plotly</option> 74 <option value="plotly_html" selected="true">An interactive html by plotly</option>
75 <option value="matplotlib_svg">SVG image by matplotlib</option> 75 <option value="matplotlib_svg">SVG image by matplotlib</option>
76 </param> 76 </param>
77 </when> 77 </when>
78 <when value="rfecv_gridscores"> 78 <when value="rfecv_gridscores">
79 <param name="infile1" type="data" format="tabular" label="Select the dataset containing grid_scores from a fitted RFECV object." help="Headered. Single column. Could be Output from `estimator_attributes->grid_scores_`."/> 79 <param name="infile1" type="data" format="tabular" label="Select the dataset containing grid_scores from a fitted RFECV object." help="Headered. Single column. Could be Output from `estimator_attributes->grid_scores_`." />
80 <param name="steps" type="text" value="" optional="true" label="Step IDs" help="List, containing hover labels for each grid_score. For example: `list(range(10)) + [15, 20]`."/> 80 <param name="steps" type="text" value="" optional="true" label="Step IDs" help="List, containing hover labels for each grid_score. For example: `list(range(10)) + [15, 20]`." />
81 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired."/> 81 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired." />
82 <param name="plot_format" type="select" label="The output format and library"> 82 <param name="plot_format" type="select" label="The output format and library">
83 <option value="html" selected="true">An interactive html by plotly</option> 83 <option value="html" selected="true">An interactive html by plotly</option>
84 <!--<option value="png">PNG image by matplotlib</option> TODO--> 84 <!--<option value="png">PNG image by matplotlib</option> TODO-->
85 </param> 85 </param>
86 </when> 86 </when>
87 <when value="feature_importances"> 87 <when value="feature_importances">
88 <param name="infile_estimator" type="data" format="zip" label="Select the dataset containing fitted estimator/pipeline" /> 88 <param name="infile_estimator" type="data" format="zip" label="Select the dataset containing fitted estimator/pipeline" />
89 <param name="infile1" type="data" format="tabular" label="Select the dataset containing feature names" help="Make sure the headers (first row) are feature names."/> 89 <param name="infile1" type="data" format="tabular" label="Select the dataset containing feature names" help="Make sure the headers (first row) are feature names." />
90 <conditional name="column_selector_options"> 90 <conditional name="column_selector_options">
91 <expand macro="samples_column_selector_options" multiple="true"/> 91 <expand macro="samples_column_selector_options" multiple="true" />
92 </conditional> 92 </conditional>
93 <param name="threshold" type="float" value="" optional="true" min="0." label="Threshold value" help="Features with importance below the threshold value will be ignored."/> 93 <param name="threshold" type="float" value="" optional="true" min="0." label="Threshold value" help="Features with importance below the threshold value will be ignored." />
94 <param name="title" type="text" value="" optional="true" label="Custom plot title" help="Optional."/> 94 <param name="title" type="text" value="" optional="true" label="Custom plot title" help="Optional." />
95 <param name="plot_format" type="select" label="The output format and library"> 95 <param name="plot_format" type="select" label="The output format and library">
96 <option value="html" selected="true">An interactive html by plotly</option> 96 <option value="html" selected="true">An interactive html by plotly</option>
97 <!--<option value="png">PNG image by matplotlib</option> TODO--> 97 <!--<option value="png">PNG image by matplotlib</option> TODO-->
98 </param> 98 </param>
99 </when> 99 </when>
100 <when value="keras_plot_model"> 100 <when value="keras_plot_model">
101 <param name="infile_model_config" type="data" format="json" label="Select the JSON dataset containing configuration for a neural network model"/> 101 <param name="infile_model_config" type="data" format="json" label="Select the JSON dataset containing configuration for a neural network model" />
102 <param name="title" type="hidden" value="" optional="true" label="Plot title" help="Optional. If change is desired."/> 102 <param name="title" type="hidden" value="" optional="true" label="Plot title" help="Optional. If change is desired." />
103 <param name="plot_format" type="hidden" value="png" label="The output format and library"/> 103 <param name="plot_format" type="hidden" value="png" label="The output format and library" />
104 </when> 104 </when>
105 105
106 <when value="classification_confusion_matrix"> 106 <when value="classification_confusion_matrix">
107 <param name="infile_true" type="data" format="tabular" label="Select dataset containing true labels"/> 107 <param name="infile_true" type="data" format="tabular" label="Select dataset containing true labels" />
108 <param name="header_true" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Does the dataset contain header:" /> 108 <param name="header_true" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Does the dataset contain header:" />
109 <conditional name="column_selector_options_true"> 109 <conditional name="column_selector_options_true">
110 <expand macro="samples_column_selector_options" multiple="true" column_option="selected_column_selector_option" 110 <expand macro="samples_column_selector_options" multiple="true" column_option="selected_column_selector_option" col_name="col1" infile="infile_true" />
111 col_name="col1" infile="infile_true"/>
112 </conditional> 111 </conditional>
113 112
114 <param name="infile_predicted" type="data" format="tabular" label="Select dataset containing predicted labels"/> 113 <param name="infile_predicted" type="data" format="tabular" label="Select dataset containing predicted labels" />
115 <param name="header_predicted" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Does the dataset contain header:" /> 114 <param name="header_predicted" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Does the dataset contain header:" />
116 <param name="title" type="text" value="Confusion matrix between true and predicted labels" label="Plot title"/> 115 <param name="title" type="text" value="Confusion matrix between true and predicted labels" label="Plot title" />
117 <param name="plot_format" type="hidden" value="png" label="The output format and library"/> 116 <param name="plot_format" type="hidden" value="png" label="The output format and library" />
118 <param name="plot_color" type="select" label="Choose plot color"> 117 <param name="plot_color" type="select" label="Choose plot color">
119 <option value="Greys">Greys</option> 118 <option value="Greys">Greys</option>
120 <option value="Purples">Purples</option> 119 <option value="Purples">Purples</option>
121 <option value="Blues">Blues</option> 120 <option value="Blues">Blues</option>
122 <option value="Greens" selected="true">Greens</option> 121 <option value="Greens" selected="true">Greens</option>
132 </conditional> 131 </conditional>
133 </inputs> 132 </inputs>
134 <outputs> 133 <outputs>
135 <data name="output" format="html" from_work_dir="output" label="${plotting_selection.plot_type} plot on ${on_string}"> 134 <data name="output" format="html" from_work_dir="output" label="${plotting_selection.plot_type} plot on ${on_string}">
136 <change_format> 135 <change_format>
137 <when input="plotting_selection.plot_format" value="png" format="png"/> 136 <when input="plotting_selection.plot_format" value="png" format="png" />
138 </change_format> 137 </change_format>
139 </data> 138 </data>
140 </outputs> 139 </outputs>
141 <tests> 140 <tests>
142 <test> 141 <test>
143 <param name="plot_type" value="roc_curve"/> 142 <param name="plot_type" value="roc_curve" />
144 <param name="infile1" value="y_true.tabular" ftype="tabular"/> 143 <param name="infile1" value="y_true.tabular" ftype="tabular" />
145 <param name="infile2" value="y_score.tabular" ftype="tabular"/> 144 <param name="infile2" value="y_score.tabular" ftype="tabular" />
146 <output name="output" file="ml_vis04.html" compare="sim_size"/> 145 <output name="output" file="ml_vis04.html" compare="sim_size" />
147 </test> 146 </test>
148 <test> 147 <test>
149 <param name="plot_type" value="feature_importances"/> 148 <param name="plot_type" value="feature_importances" />
150 <param name="infile_estimator" value="best_estimator_.zip" ftype="zip"/> 149 <param name="infile_estimator" value="best_estimator_.zip" ftype="zip" />
151 <param name="infile1" value="regression_X.tabular" ftype="tabular"/> 150 <param name="infile1" value="regression_X.tabular" ftype="tabular" />
152 <param name="selected_column_selector_option" value="all_columns"/> 151 <param name="selected_column_selector_option" value="all_columns" />
153 <output name="output" file="ml_vis01.html" compare="sim_size"/> 152 <output name="output" file="ml_vis01.html" compare="sim_size" />
154 </test> 153 </test>
155 <test> 154 <test>
156 <param name="plot_type" value="learning_curve"/> 155 <param name="plot_type" value="learning_curve" />
157 <param name="infile1" value="mv_result03.tabular" ftype="tabular"/> 156 <param name="infile1" value="mv_result03.tabular" ftype="tabular" />
158 <output name="output" file="ml_vis02.html" compare="sim_size"/> 157 <output name="output" file="ml_vis02.html" compare="sim_size" />
159 </test> 158 </test>
160 <test> 159 <test>
161 <param name="plot_type" value="pr_curve"/> 160 <param name="plot_type" value="pr_curve" />
162 <param name="infile1" value="y_true.tabular" ftype="tabular"/> 161 <param name="infile1" value="y_true.tabular" ftype="tabular" />
163 <param name="infile2" value="y_score.tabular" ftype="tabular"/> 162 <param name="infile2" value="y_score.tabular" ftype="tabular" />
164 <output name="output" file="ml_vis03.html" compare="sim_size"/> 163 <output name="output" file="ml_vis03.html" compare="sim_size" />
165 </test> 164 </test>
166 <test> 165 <test>
167 <param name="plot_type" value="rfecv_gridscores"/> 166 <param name="plot_type" value="rfecv_gridscores" />
168 <param name="infile1" value="grid_scores_.tabular" ftype="tabular"/> 167 <param name="infile1" value="grid_scores_.tabular" ftype="tabular" />
169 <output name="output" file="ml_vis05.html" compare="sim_size"/> 168 <output name="output" file="ml_vis05.html" compare="sim_size" />
170 </test> 169 </test>
171 <test> 170 <test>
172 <param name="plot_type" value="keras_plot_model"/> 171 <param name="plot_type" value="keras_plot_model" />
173 <param name="infile_model_config" value="deepsear_1feature.json" ftype="json"/> 172 <param name="infile_model_config" value="deepsear_1feature.json" ftype="json" />
174 <output name="output" file="ml_vis05.png" compare="sim_size" delta="20000"/> 173 <output name="output" file="ml_vis05.png" compare="sim_size" delta="20000" />
175 </test> 174 </test>
176 <test> 175 <test>
177 <param name="plot_type" value="classification_confusion_matrix"/> 176 <param name="plot_type" value="classification_confusion_matrix" />
178 <param name="infile_true" value="ml_confusion_true.tabular" ftype="tabular"/> 177 <param name="infile_true" value="ml_confusion_true.tabular" ftype="tabular" />
179 <param name="header_true" value="False"/> 178 <param name="header_true" value="False" />
180 <param name="selected_column_selector_option" value="all_columns"/> 179 <param name="selected_column_selector_option" value="all_columns" />
181 <param name="infile_predicted" value="ml_confusion_predicted.tabular" ftype="tabular"/> 180 <param name="infile_predicted" value="ml_confusion_predicted.tabular" ftype="tabular" />
182 <param name="header_predicted" value="False"/> 181 <param name="header_predicted" value="False" />
183 <param name="title" value="Confusion matrix"/> 182 <param name="title" value="Confusion matrix" />
184 <param name="plot_color" value="winter" /> 183 <param name="plot_color" value="winter" />
185 <output name="output" file="ml_confusion_viz.png" compare="sim_size"/> 184 <output name="output" file="ml_confusion_viz.png" compare="sim_size" />
186 </test> 185 </test>
187 <test> 186 <test>
188 <param name="plot_type" value="classification_confusion_matrix"/> 187 <param name="plot_type" value="classification_confusion_matrix" />
189 <param name="infile_true" value="true_header.tabular" ftype="tabular"/> 188 <param name="infile_true" value="true_header.tabular" ftype="tabular" />
190 <param name="header_true" value="True"/> 189 <param name="header_true" value="True" />
191 <param name="selected_column_selector_option" value="all_columns"/> 190 <param name="selected_column_selector_option" value="all_columns" />
192 <param name="infile_predicted" value="predicted_header.tabular" ftype="tabular"/> 191 <param name="infile_predicted" value="predicted_header.tabular" ftype="tabular" />
193 <param name="header_predicted" value="True"/> 192 <param name="header_predicted" value="True" />
194 <param name="title" value="Confusion matrix"/> 193 <param name="title" value="Confusion matrix" />
195 <param name="plot_color" value="winter" /> 194 <param name="plot_color" value="winter" />
196 <output name="output" file="ml_confusion_viz.png" compare="sim_size"/> 195 <output name="output" file="ml_confusion_viz.png" compare="sim_size" />
197 </test> 196 </test>
198 </tests> 197 </tests>
199 <help> 198 <help>
200 <![CDATA[ 199 <![CDATA[
201 **What it does** 200 **What it does**