comparison ml_visualization_ex.xml @ 14:9c19cf3c4ea0 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
author bgruening
date Wed, 09 Aug 2023 13:08:43 +0000
parents 6cf6f27547cb
children a536d2736c2d
comparison
equal deleted inserted replaced
13:c80db5d6fd8c 14:9c19cf3c4ea0
1 <tool id="ml_visualization_ex" name="Machine Learning Visualization Extension" version="@VERSION@" profile="20.05"> 1 <tool id="ml_visualization_ex" name="Machine Learning Visualization Extension" version="@VERSION@" profile="@PROFILE@">
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>
19 #elif $plotting_selection.plot_type == 'feature_importances' 19 #elif $plotting_selection.plot_type == 'feature_importances'
20 --estimator '$plotting_selection.infile_estimator' 20 --estimator '$plotting_selection.infile_estimator'
21 --infile1 '$plotting_selection.infile1' 21 --infile1 '$plotting_selection.infile1'
22 #elif $plotting_selection.plot_type == 'keras_plot_model' 22 #elif $plotting_selection.plot_type == 'keras_plot_model'
23 --model_config '$plotting_selection.infile_model_config' 23 --model_config '$plotting_selection.infile_model_config'
24 #elif $plotting_selection.plot_type == 'classification_confusion_matrix'
25 --true_labels '$plotting_selection.infile_true'
26 --predicted_labels '$plotting_selection.infile_predicted'
27 --plot_color '$plotting_selection.plot_color'
28 --title '$plotting_selection.title'
29 #end if 24 #end if
30 ]]> 25 ]]>
31 </command> 26 </command>
32 <configfiles> 27 <configfiles>
33 <inputs name="inputs" /> 28 <inputs name="inputs" />
39 <option value="pr_curve">2-class / multpi-label Precison Recall curve</option> 34 <option value="pr_curve">2-class / multpi-label Precison Recall curve</option>
40 <option value="roc_curve">2-class / multi-label Receiver Operating Characteristic (ROC) curve</option> 35 <option value="roc_curve">2-class / multi-label Receiver Operating Characteristic (ROC) curve</option>
41 <option value="rfecv_gridscores">Number of features vs. Recursive Feature Elimination gridscores with corss-validation</option> 36 <option value="rfecv_gridscores">Number of features vs. Recursive Feature Elimination gridscores with corss-validation</option>
42 <option value="feature_importances">Feature Importances plot</option> 37 <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> 38 <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>
45 </param> 39 </param>
46 <when value="learning_curve"> 40 <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." /> 41 <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?" /> 42 <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." /> 43 <param name="title" type="text" value="" optional="true" label="Plot title" help="Optional. If change is desired." />
83 <option value="html" selected="true">An interactive html by plotly</option> 77 <option value="html" selected="true">An interactive html by plotly</option>
84 <!--<option value="png">PNG image by matplotlib</option> TODO--> 78 <!--<option value="png">PNG image by matplotlib</option> TODO-->
85 </param> 79 </param>
86 </when> 80 </when>
87 <when value="feature_importances"> 81 <when value="feature_importances">
88 <param name="infile_estimator" type="data" format="zip" label="Select the dataset containing fitted estimator/pipeline" /> 82 <param name="infile_estimator" type="data" format="h5mlm" 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." /> 83 <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"> 84 <conditional name="column_selector_options">
91 <expand macro="samples_column_selector_options" multiple="true" /> 85 <expand macro="samples_column_selector_options" multiple="true" />
92 </conditional> 86 </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." /> 87 <param name="threshold" type="float" value="" optional="true" min="0." label="Threshold value" help="Features with importance below the threshold value will be ignored." />
99 </when> 93 </when>
100 <when value="keras_plot_model"> 94 <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" /> 95 <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." /> 96 <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" /> 97 <param name="plot_format" type="hidden" value="png" label="The output format and library" />
104 </when>
105
106 <when value="classification_confusion_matrix">
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:" />
109 <conditional name="column_selector_options_true">
110 <expand macro="samples_column_selector_options" multiple="true" column_option="selected_column_selector_option" col_name="col1" infile="infile_true" />
111 </conditional>
112
113 <param name="infile_predicted" type="data" format="tabular" label="Select dataset containing predicted labels" />
114 <param name="header_predicted" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Does the dataset contain header:" />
115 <param name="title" type="text" value="Confusion matrix between true and predicted labels" label="Plot title" />
116 <param name="plot_format" type="hidden" value="png" label="The output format and library" />
117 <param name="plot_color" type="select" label="Choose plot color">
118 <option value="Greys">Greys</option>
119 <option value="Purples">Purples</option>
120 <option value="Blues">Blues</option>
121 <option value="Greens" selected="true">Greens</option>
122 <option value="Oranges">Oranges</option>
123 <option value="Reds">Reds</option>
124 <option value="Summer">Summer</option>
125 <option value="Autumn">Autumn</option>
126 <option value="RdYlGn">RdYlGn</option>
127 <option value="Spectral">Spectral</option>
128 <option value="winter">winter</option>
129 </param>
130 </when> 98 </when>
131 </conditional> 99 </conditional>
132 </inputs> 100 </inputs>
133 <outputs> 101 <outputs>
134 <data name="output" format="html" from_work_dir="output" label="${plotting_selection.plot_type} plot on ${on_string}"> 102 <data name="output" format="html" from_work_dir="output" label="${plotting_selection.plot_type} plot on ${on_string}">
144 <param name="infile2" value="y_score.tabular" ftype="tabular" /> 112 <param name="infile2" value="y_score.tabular" ftype="tabular" />
145 <output name="output" file="ml_vis04.html" compare="sim_size" /> 113 <output name="output" file="ml_vis04.html" compare="sim_size" />
146 </test> 114 </test>
147 <test> 115 <test>
148 <param name="plot_type" value="feature_importances" /> 116 <param name="plot_type" value="feature_importances" />
149 <param name="infile_estimator" value="best_estimator_.zip" ftype="zip" /> 117 <param name="infile_estimator" value="best_estimator_.h5mlm" ftype="h5mlm" />
150 <param name="infile1" value="regression_X.tabular" ftype="tabular" /> 118 <param name="infile1" value="regression_X.tabular" ftype="tabular" />
151 <param name="selected_column_selector_option" value="all_columns" /> 119 <param name="selected_column_selector_option" value="all_columns" />
152 <output name="output" file="ml_vis01.html" compare="sim_size" /> 120 <output name="output" file="ml_vis01.html" compare="sim_size" />
153 </test> 121 </test>
154 <test> 122 <test>
169 </test> 137 </test>
170 <test> 138 <test>
171 <param name="plot_type" value="keras_plot_model" /> 139 <param name="plot_type" value="keras_plot_model" />
172 <param name="infile_model_config" value="deepsear_1feature.json" ftype="json" /> 140 <param name="infile_model_config" value="deepsear_1feature.json" ftype="json" />
173 <output name="output" file="ml_vis05.png" compare="sim_size" delta="20000" /> 141 <output name="output" file="ml_vis05.png" compare="sim_size" delta="20000" />
174 </test>
175 <test>
176 <param name="plot_type" value="classification_confusion_matrix" />
177 <param name="infile_true" value="ml_confusion_true.tabular" ftype="tabular" />
178 <param name="header_true" value="False" />
179 <param name="selected_column_selector_option" value="all_columns" />
180 <param name="infile_predicted" value="ml_confusion_predicted.tabular" ftype="tabular" />
181 <param name="header_predicted" value="False" />
182 <param name="title" value="Confusion matrix" />
183 <param name="plot_color" value="winter" />
184 <output name="output" file="ml_confusion_viz.png" compare="sim_size" />
185 </test>
186 <test>
187 <param name="plot_type" value="classification_confusion_matrix" />
188 <param name="infile_true" value="true_header.tabular" ftype="tabular" />
189 <param name="header_true" value="True" />
190 <param name="selected_column_selector_option" value="all_columns" />
191 <param name="infile_predicted" value="predicted_header.tabular" ftype="tabular" />
192 <param name="header_predicted" value="True" />
193 <param name="title" value="Confusion matrix" />
194 <param name="plot_color" value="winter" />
195 <output name="output" file="ml_confusion_viz.png" compare="sim_size" />
196 </test> 142 </test>
197 </tests> 143 </tests>
198 <help> 144 <help>
199 <![CDATA[ 145 <![CDATA[
200 **What it does** 146 **What it does**