comparison stacking_ensembles.xml @ 10:ac40a2fe5750 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit e2a5eade6d0e5ddf3a47630381a0ad90d80e8a04"
author bgruening
date Tue, 13 Apr 2021 17:21:05 +0000
parents a2e4a45c6083
children
comparison
equal deleted inserted replaced
9:b78007bf1cb8 10:ac40a2fe5750
1 <tool id="sklearn_stacking_ensemble_models" name="Stacking Ensembles" version="@VERSION@"> 1 <tool id="sklearn_stacking_ensemble_models" name="Stacking Ensembles" version="@VERSION@" profile="20.05">
2 <description>builds stacking, voting ensemble models with numerous base options</description> 2 <description>builds stacking, voting ensemble models with numerous base options</description>
3 <macros> 3 <macros>
4 <import>main_macros.xml</import> 4 <import>main_macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="python_requirements"/> 6 <expand macro="python_requirements" />
7 <expand macro="macro_stdio"/> 7 <expand macro="macro_stdio" />
8 <version_command>echo "$ENSEMBLE_VERSION"</version_command> 8 <version_command>echo "$ENSEMBLE_VERSION"</version_command>
9 <command> 9 <command>
10 <![CDATA[ 10 <![CDATA[
11 #for $i, $base in enumerate($base_est_builder) 11 #for $i, $base in enumerate($base_est_builder)
12 #if $i == 0 12 #if $i == 0
52 <expand macro="stacking_voting_weights"> 52 <expand macro="stacking_voting_weights">
53 <param argument="voting" type="select" help="If ‘hard’, uses predicted class labels for majority rule voting. Else if ‘soft’, predicts the class label based on the argmax of the sums of the predicted probabilities, which is recommended for an ensemble of well-calibrated classifiers."> 53 <param argument="voting" type="select" help="If ‘hard’, uses predicted class labels for majority rule voting. Else if ‘soft’, predicts the class label based on the argmax of the sums of the predicted probabilities, which is recommended for an ensemble of well-calibrated classifiers.">
54 <option value="hard" selected="true">hard</option> 54 <option value="hard" selected="true">hard</option>
55 <option value="soft">soft</option> 55 <option value="soft">soft</option>
56 </param> 56 </param>
57 <param argument="flatten_transform" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" help=""/> 57 <param argument="flatten_transform" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" help="" />
58 </expand> 58 </expand>
59 </when> 59 </when>
60 <when value="sklearn.ensemble_VotingRegressor"> 60 <when value="sklearn.ensemble_VotingRegressor">
61 <expand macro="stacking_voting_weights"/> 61 <expand macro="stacking_voting_weights" />
62 </when> 62 </when>
63 <when value="mlxtend.classifier_StackingCVClassifier"> 63 <when value="mlxtend.classifier_StackingCVClassifier">
64 <expand macro="stacking_ensemble_inputs"> 64 <expand macro="stacking_ensemble_inputs">
65 <expand macro="cv_reduced"/> 65 <expand macro="cv_reduced" />
66 <expand macro="shuffle" label="shuffle"/> 66 <expand macro="shuffle" label="shuffle" />
67 <expand macro="random_state" default_value="" help_text="Integer number. The seed of the pseudo random number generator to use when shuffling the data."/> 67 <expand macro="random_state" default_value="" help_text="Integer number. The seed of the pseudo random number generator to use when shuffling the data." />
68 <param argument="use_probas" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false"/> 68 <param argument="use_probas" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" />
69 </expand> 69 </expand>
70 <section name="meta_estimator" title="Meta Estimator" expanded="true"> 70 <section name="meta_estimator" title="Meta Estimator" expanded="true">
71 <expand macro="stacking_base_estimator"/> 71 <expand macro="stacking_base_estimator" />
72 </section> 72 </section>
73 </when> 73 </when>
74 <when value="mlxtend.classifier_StackingClassifier"> 74 <when value="mlxtend.classifier_StackingClassifier">
75 <expand macro="stacking_ensemble_inputs"> 75 <expand macro="stacking_ensemble_inputs">
76 <param argument="use_probas" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false"/> 76 <param argument="use_probas" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" />
77 <param argument="average_probas" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false"/> 77 <param argument="average_probas" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" />
78 </expand> 78 </expand>
79 <section name="meta_estimator" title="Meta Estimator" expanded="true"> 79 <section name="meta_estimator" title="Meta Estimator" expanded="true">
80 <expand macro="stacking_base_estimator"/> 80 <expand macro="stacking_base_estimator" />
81 </section> 81 </section>
82 </when> 82 </when>
83 <when value="mlxtend.regressor_StackingCVRegressor"> 83 <when value="mlxtend.regressor_StackingCVRegressor">
84 <expand macro="stacking_ensemble_inputs"> 84 <expand macro="stacking_ensemble_inputs">
85 <expand macro="cv_reduced"/> 85 <expand macro="cv_reduced" />
86 <!--TODO support group splitters. Hint: `groups` is a fit_param--> 86 <!--TODO support group splitters. Hint: `groups` is a fit_param-->
87 <expand macro="shuffle" label="shuffle"/> 87 <expand macro="shuffle" label="shuffle" />
88 <expand macro="random_state" default_value="" help_text="Integer number. The seed of the pseudo random number generator to use when shuffling the data."/> 88 <expand macro="random_state" default_value="" help_text="Integer number. The seed of the pseudo random number generator to use when shuffling the data." />
89 <param argument="refit" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true"/> 89 <param argument="refit" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" />
90 </expand> 90 </expand>
91 <section name="meta_estimator" title="Meta Estimator" expanded="true"> 91 <section name="meta_estimator" title="Meta Estimator" expanded="true">
92 <expand macro="stacking_base_estimator"/> 92 <expand macro="stacking_base_estimator" />
93 </section> 93 </section>
94 </when> 94 </when>
95 <when value="mlxtend.regressor_StackingRegressor"> 95 <when value="mlxtend.regressor_StackingRegressor">
96 <expand macro="stacking_ensemble_inputs"> 96 <expand macro="stacking_ensemble_inputs">
97 <param argument="refit" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true"/> 97 <param argument="refit" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" />
98 </expand> 98 </expand>
99 <section name="meta_estimator" title="Meta Estimator" expanded="true"> 99 <section name="meta_estimator" title="Meta Estimator" expanded="true">
100 <expand macro="stacking_base_estimator"/> 100 <expand macro="stacking_base_estimator" />
101 </section> 101 </section>
102 </when> 102 </when>
103 </conditional> 103 </conditional>
104 <repeat name="base_est_builder" min="1" max="20" title="Base Estimator"> 104 <repeat name="base_est_builder" min="1" max="20" title="Base Estimator">
105 <expand macro="stacking_base_estimator"/> 105 <expand macro="stacking_base_estimator" />
106 <!--param name="base_estimator" type="data" format="zip,json" label="Select the dataset containing base estimator" help="One estimator at a time."/--> 106 <!--param name="base_estimator" type="data" format="zip,json" label="Select the dataset containing base estimator" help="One estimator at a time."/-->
107 </repeat> 107 </repeat>
108 <!--param name="meta_estimator" type="data" format="zip,json" label="Select the dataset containing the Meta estimator"/--> 108 <!--param name="meta_estimator" type="data" format="zip,json" label="Select the dataset containing the Meta estimator"/-->
109 <param name="get_params" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Output parameters for searchCV?" 109 <param name="get_params" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Output parameters for searchCV?" help="Optional. Tunable parameters could be obtained through `estimator_attributes` tool." />
110 help="Optional. Tunable parameters could be obtained through `estimator_attributes` tool."/>
111 </inputs> 110 </inputs>
112 <outputs> 111 <outputs>
113 <data format="zip" name="outfile" label="${algo_selection.estimator_type} on ${on_string}"/> 112 <data format="zip" name="outfile" label="${algo_selection.estimator_type} on ${on_string}" />
114 <data format="tabular" name="outfile_params" label="get_params for ${algo_selection.estimator_type}"> 113 <data format="tabular" name="outfile_params" label="get_params for ${algo_selection.estimator_type}">
115 <filter>get_params</filter> 114 <filter>get_params</filter>
116 </data> 115 </data>
117 </outputs> 116 </outputs>
118 <tests> 117 <tests>
119 <test> 118 <test>
120 <conditional name="algo_selection"> 119 <conditional name="algo_selection">
121 <param name="estimator_type" value="sklearn.ensemble_VotingClassifier"/> 120 <param name="estimator_type" value="sklearn.ensemble_VotingClassifier" />
122 <section name="options"> 121 <section name="options">
123 <param name="weights" value="[1, 2]"/> 122 <param name="weights" value="[1, 2]" />
124 </section> 123 </section>
125 </conditional> 124 </conditional>
126 <repeat name="base_est_builder"> 125 <repeat name="base_est_builder">
127 <conditional name="estimator_selector"> 126 <conditional name="estimator_selector">
128 <param name="selected_module" value="svm"/> 127 <param name="selected_module" value="svm" />
129 <param name="selected_estimator" value="SVC"/> 128 <param name="selected_estimator" value="SVC" />
130 </conditional> 129 </conditional>
131 </repeat> 130 </repeat>
132 <repeat name="base_est_builder"> 131 <repeat name="base_est_builder">
133 <conditional name="estimator_selector"> 132 <conditional name="estimator_selector">
134 <param name="selected_module" value="xgboost"/> 133 <param name="selected_module" value="xgboost" />
135 <param name="selected_estimator" value="XGBClassifier"/> 134 <param name="selected_estimator" value="XGBClassifier" />
136 </conditional> 135 </conditional>
137 </repeat> 136 </repeat>
138 <param name="get_params" value="false"/> 137 <param name="get_params" value="false" />
139 <output name="outfile" file="StackingVoting03.zip" compare="sim_size" delta="5"/> 138 <output name="outfile" file="StackingVoting03.zip" compare="sim_size" delta="5" />
140 </test> 139 </test>
141 <test> 140 <test>
142 <conditional name="algo_selection"> 141 <conditional name="algo_selection">
143 <param name="estimator_type" value="mlxtend.regressor_StackingCVRegressor"/> 142 <param name="estimator_type" value="mlxtend.regressor_StackingCVRegressor" />
144 <section name="meta_estimator"> 143 <section name="meta_estimator">
145 <conditional name="estimator_selector"> 144 <conditional name="estimator_selector">
146 <param name="selected_module" value="custom_estimator"/> 145 <param name="selected_module" value="custom_estimator" />
147 <param name="c_estimator" value="LinearRegression01.zip" ftype="zip"/> 146 <param name="c_estimator" value="LinearRegression01.zip" ftype="zip" />
148 </conditional> 147 </conditional>
149 </section> 148 </section>
150 </conditional> 149 </conditional>
151 <repeat name="base_est_builder"> 150 <repeat name="base_est_builder">
152 <conditional name="estimator_selector"> 151 <conditional name="estimator_selector">
153 <param name="selected_module" value="custom_estimator"/> 152 <param name="selected_module" value="custom_estimator" />
154 <param name="c_estimator" value="RandomForestRegressor01.zip" ftype="zip"/> 153 <param name="c_estimator" value="RandomForestRegressor01.zip" ftype="zip" />
155 </conditional> 154 </conditional>
156 </repeat> 155 </repeat>
157 <repeat name="base_est_builder"> 156 <repeat name="base_est_builder">
158 <conditional name="estimator_selector"> 157 <conditional name="estimator_selector">
159 <param name="selected_module" value="custom_estimator"/> 158 <param name="selected_module" value="custom_estimator" />
160 <param name="c_estimator" value="XGBRegressor01.zip" ftype="zip"/> 159 <param name="c_estimator" value="XGBRegressor01.zip" ftype="zip" />
161 </conditional> 160 </conditional>
162 </repeat> 161 </repeat>
163 <param name="get_params" value="false"/> 162 <param name="get_params" value="false" />
164 <output name="outfile" file="StackingCVRegressor01.zip" compare="sim_size" delta="5"/> 163 <output name="outfile" file="StackingCVRegressor01.zip" compare="sim_size" delta="5" />
165 </test> 164 </test>
166 <test> 165 <test>
167 <conditional name="algo_selection"> 166 <conditional name="algo_selection">
168 <param name="estimator_type" value="mlxtend.regressor_StackingRegressor"/> 167 <param name="estimator_type" value="mlxtend.regressor_StackingRegressor" />
169 <section name="meta_estimator"> 168 <section name="meta_estimator">
170 <conditional name="estimator_selector"> 169 <conditional name="estimator_selector">
171 <param name="selected_module" value="svm"/> 170 <param name="selected_module" value="svm" />
172 <param name="selected_estimator" value="SVR"/> 171 <param name="selected_estimator" value="SVR" />
173 </conditional> 172 </conditional>
174 </section> 173 </section>
175 </conditional> 174 </conditional>
176 <repeat name="base_est_builder"> 175 <repeat name="base_est_builder">
177 <conditional name="estimator_selector"> 176 <conditional name="estimator_selector">
178 <param name="selected_module" value="custom_estimator"/> 177 <param name="selected_module" value="custom_estimator" />
179 <param name="c_estimator" value="RandomForestRegressor01.zip" ftype="zip"/> 178 <param name="c_estimator" value="RandomForestRegressor01.zip" ftype="zip" />
180 </conditional> 179 </conditional>
181 </repeat> 180 </repeat>
182 <repeat name="base_est_builder"> 181 <repeat name="base_est_builder">
183 <conditional name="estimator_selector"> 182 <conditional name="estimator_selector">
184 <param name="selected_module" value="xgboost"/> 183 <param name="selected_module" value="xgboost" />
185 <param name="selected_estimator" value="XGBRegressor"/> 184 <param name="selected_estimator" value="XGBRegressor" />
186 </conditional> 185 </conditional>
187 </repeat> 186 </repeat>
188 <param name="get_params" value="false"/> 187 <param name="get_params" value="false" />
189 <output name="outfile" file="StackingRegressor02.zip" compare="sim_size" delta="5"/> 188 <output name="outfile" file="StackingRegressor02.zip" compare="sim_size" delta="5" />
190 </test> 189 </test>
191 </tests> 190 </tests>
192 <help> 191 <help>
193 <![CDATA[ 192 <![CDATA[
194 This tool wrapps Stacking Regression, also called Super Learning, in which different base algorithms train 193 This tool wrapps Stacking Regression, also called Super Learning, in which different base algorithms train
200 http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/stacked-ensembles.html#introduction 199 http://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/stacked-ensembles.html#introduction
201 200
202 ]]> 201 ]]>
203 </help> 202 </help>
204 <expand macro="sklearn_citation"> 203 <expand macro="sklearn_citation">
205 <expand macro="skrebate_citation"/> 204 <expand macro="skrebate_citation" />
206 <expand macro="xgboost_citation"/> 205 <expand macro="xgboost_citation" />
207 <expand macro="imblearn_citation"/> 206 <expand macro="imblearn_citation" />
208 <citation type="bibtex"> 207 <citation type="bibtex">
209 @article{raschkas_2018_mlxtend, 208 @article{raschkas_2018_mlxtend,
210 author = {Sebastian Raschka}, 209 author = {Sebastian Raschka},
211 title = {MLxtend: Providing machine learning and data science 210 title = {MLxtend: Providing machine learning and data science
212 utilities and extensions to Python’s 211 utilities and extensions to Python’s