comparison model_validation.xml @ 28:9b017b0da56e draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit e2a5eade6d0e5ddf3a47630381a0ad90d80e8a04"
author bgruening
date Tue, 13 Apr 2021 19:01:30 +0000
parents a5aed87b2cc0
children 4b359039f09f
comparison
equal deleted inserted replaced
27:bfc7bdfcb423 28:9b017b0da56e
1 <tool id="sklearn_model_validation" name="Model Validation" version="@VERSION@"> 1 <tool id="sklearn_model_validation" name="Model Validation" version="@VERSION@" profile="20.05">
2 <description>includes cross_validate, cross_val_predict, learning_curve, and more</description> 2 <description>includes cross_validate, cross_val_predict, learning_curve, and more</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 "@VERSION@"</version_command> 8 <version_command>echo "@VERSION@"</version_command>
9 <command> 9 <command>
10 <![CDATA[ 10 <![CDATA[
11 export HDF5_USE_FILE_LOCKING='FALSE'; 11 export HDF5_USE_FILE_LOCKING='FALSE';
12 python "$sklearn_model_validation_script" '$inputs' 12 python "$sklearn_model_validation_script" '$inputs'
265 265
266 ]]> 266 ]]>
267 </configfile> 267 </configfile>
268 </configfiles> 268 </configfiles>
269 <inputs> 269 <inputs>
270 <param name="infile_estimator" type="data" format="zip" label="Choose the dataset containing model/pipeline object"/> 270 <param name="infile_estimator" type="data" format="zip" label="Choose the dataset containing model/pipeline object" />
271 <conditional name="model_validation_functions"> 271 <conditional name="model_validation_functions">
272 <param name="selected_function" type="select" label="Select a model validation function"> 272 <param name="selected_function" type="select" label="Select a model validation function">
273 <option value="cross_validate">cross_validate - Evaluate metric(s) by cross-validation and also record fit/score times</option> 273 <option value="cross_validate">cross_validate - Evaluate metric(s) by cross-validation and also record fit/score times</option>
274 <option value="cross_val_predict">cross_val_predict - Generate cross-validated estimates for each input data point</option> 274 <option value="cross_val_predict">cross_val_predict - Generate cross-validated estimates for each input data point</option>
275 <option value="learning_curve">learning_curve - Learning curve</option> 275 <option value="learning_curve">learning_curve - Learning curve</option>
276 <option value="permutation_test_score">permutation_test_score - Evaluate the significance of a cross-validated score with permutations</option> 276 <option value="permutation_test_score">permutation_test_score - Evaluate the significance of a cross-validated score with permutations</option>
277 <option value="validation_curve">validation_curve - Use grid search with one parameter instead</option> 277 <option value="validation_curve">validation_curve - Use grid search with one parameter instead</option>
278 </param> 278 </param>
279 <when value="cross_validate"> 279 <when value="cross_validate">
280 <section name="options" title="Other Options" expanded="false"> 280 <section name="options" title="Other Options" expanded="false">
281 <expand macro="scoring_selection"/> 281 <expand macro="scoring_selection" />
282 <expand macro="model_validation_common_options"/> 282 <expand macro="model_validation_common_options" />
283 <param argument="return_train_score" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" help="Whether to include train scores."/> 283 <param argument="return_train_score" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" help="Whether to include train scores." />
284 <!--param argument="return_estimator" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" help="Whether to return the estimators fitted on each split."/> --> 284 <!--param argument="return_estimator" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" help="Whether to return the estimators fitted on each split."/> -->
285 <!--param argument="error_score" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Raise fit error:" help="If false, the metric score is assigned to NaN if an error occurs in estimator fitting and FitFailedWarning is raised."/> --> 285 <!--param argument="error_score" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Raise fit error:" help="If false, the metric score is assigned to NaN if an error occurs in estimator fitting and FitFailedWarning is raised."/> -->
286 <!--fit_params--> 286 <!--fit_params-->
287 <expand macro="pre_dispatch"/> 287 <expand macro="pre_dispatch" />
288 </section> 288 </section>
289 </when> 289 </when>
290 <when value="cross_val_predict"> 290 <when value="cross_val_predict">
291 <section name="options" title="Other Options" expanded="false"> 291 <section name="options" title="Other Options" expanded="false">
292 <expand macro="model_validation_common_options" /> 292 <expand macro="model_validation_common_options" />
293 <!--fit_params--> 293 <!--fit_params-->
294 <expand macro="pre_dispatch" value="2*n_jobs’" help="Controls the number of jobs that get dispatched during parallel execution"/> 294 <expand macro="pre_dispatch" value="2*n_jobs’" help="Controls the number of jobs that get dispatched during parallel execution" />
295 <param argument="method" type="select" label="Invokes the passed method name of the passed estimator"> 295 <param argument="method" type="select" label="Invokes the passed method name of the passed estimator">
296 <option value="predict" selected="true">predict</option> 296 <option value="predict" selected="true">predict</option>
297 <option value="predict_proba">predict_proba</option> 297 <option value="predict_proba">predict_proba</option>
298 </param> 298 </param>
299 </section> 299 </section>
300 </when> 300 </when>
301 <when value="learning_curve"> 301 <when value="learning_curve">
302 <section name="options" title="Other Options" expanded="false"> 302 <section name="options" title="Other Options" expanded="false">
303 <expand macro="scoring_selection"/> 303 <expand macro="scoring_selection" />
304 <expand macro="model_validation_common_options"/> 304 <expand macro="model_validation_common_options" />
305 <param argument="train_sizes" type="text" value="(0.1, 1.0, 5)" label="train_sizes" 305 <param argument="train_sizes" type="text" value="(0.1, 1.0, 5)" label="train_sizes" help="Relative or absolute numbers of training examples that will be used to generate the learning curve. Supports 1) tuple, to be evaled by np.linspace, e.g. (0.1, 1.0, 5); 2) array-like, e.g. [0.1 , 0.325, 0.55 , 0.775, 1.]">
306 help="Relative or absolute numbers of training examples that will be used to generate the learning curve. Supports 1) tuple, to be evaled by np.linspace, e.g. (0.1, 1.0, 5); 2) array-like, e.g. [0.1 , 0.325, 0.55 , 0.775, 1.]">
307 <sanitizer> 306 <sanitizer>
308 <valid initial="default"> 307 <valid initial="default">
309 <add value="["/> 308 <add value="[" />
310 <add value="]"/> 309 <add value="]" />
311 </valid> 310 </valid>
312 </sanitizer> 311 </sanitizer>
313 </param> 312 </param>
314 <param argument="exploit_incremental_learning" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" help="Whether to apply incremental learning to speed up fitting of the estimator if supported"/> 313 <param argument="exploit_incremental_learning" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" help="Whether to apply incremental learning to speed up fitting of the estimator if supported" />
315 <expand macro="pre_dispatch"/> 314 <expand macro="pre_dispatch" />
316 <expand macro="shuffle" checked="false" label="shuffle" help="Whether to shuffle training data before taking prefixes"/> 315 <expand macro="shuffle" checked="false" label="shuffle" help="Whether to shuffle training data before taking prefixes" />
317 <expand macro="random_state" help_text="If int, the seed used by the random number generator. Used when `shuffle` is True"/> 316 <expand macro="random_state" help_text="If int, the seed used by the random number generator. Used when `shuffle` is True" />
318 </section> 317 </section>
319 </when> 318 </when>
320 <when value="permutation_test_score"> 319 <when value="permutation_test_score">
321 <section name="options" title="Other Options" expanded="false"> 320 <section name="options" title="Other Options" expanded="false">
322 <expand macro="scoring_selection"/> 321 <expand macro="scoring_selection" />
323 <expand macro="model_validation_common_options"/> 322 <expand macro="model_validation_common_options" />
324 <param name="n_permutations" type="integer" value="100" optional="true" label="n_permutations" help="Number of times to permute y"/> 323 <param name="n_permutations" type="integer" value="100" optional="true" label="n_permutations" help="Number of times to permute y" />
325 <expand macro="random_state"/> 324 <expand macro="random_state" />
326 </section> 325 </section>
327 </when> 326 </when>
328 <when value="validation_curve"/> 327 <when value="validation_curve" />
329 </conditional> 328 </conditional>
330 <expand macro="sl_mixed_input_plus_sequence"/> 329 <expand macro="sl_mixed_input_plus_sequence" />
331 </inputs> 330 </inputs>
332 <outputs> 331 <outputs>
333 <data format="tabular" name="outfile"/> 332 <data format="tabular" name="outfile" />
334 </outputs> 333 </outputs>
335 <tests> 334 <tests>
336 <test> 335 <test>
337 <param name="infile_estimator" value="pipeline02"/> 336 <param name="infile_estimator" value="pipeline02" />
338 <param name="selected_function" value="cross_validate"/> 337 <param name="selected_function" value="cross_validate" />
339 <param name="return_train_score" value="True"/> 338 <param name="return_train_score" value="True" />
340 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> 339 <param name="infile1" value="regression_train.tabular" ftype="tabular" />
341 <param name="col1" value="1,2,3,4,5"/> 340 <param name="col1" value="1,2,3,4,5" />
342 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> 341 <param name="infile2" value="regression_train.tabular" ftype="tabular" />
343 <param name="col2" value="6"/> 342 <param name="col2" value="6" />
344 <output name="outfile"> 343 <output name="outfile">
345 <assert_contents> 344 <assert_contents>
346 <has_n_columns n="6"/> 345 <has_n_columns n="6" />
347 <has_text text="0.9999961390418067"/> 346 <has_text text="0.9999961390418067" />
348 <has_text text="0.9944541531269271"/> 347 <has_text text="0.9944541531269271" />
349 <has_text text="0.9999193322454393"/> 348 <has_text text="0.9999193322454393" />
350 </assert_contents> 349 </assert_contents>
351 </output> 350 </output>
352 </test> 351 </test>
353 <test> 352 <test>
354 <param name="infile_estimator" value="pipeline02"/> 353 <param name="infile_estimator" value="pipeline02" />
355 <param name="selected_function" value="cross_val_predict"/> 354 <param name="selected_function" value="cross_val_predict" />
356 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> 355 <param name="infile1" value="regression_train.tabular" ftype="tabular" />
357 <param name="col1" value="1,2,3,4,5"/> 356 <param name="col1" value="1,2,3,4,5" />
358 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> 357 <param name="infile2" value="regression_train.tabular" ftype="tabular" />
359 <param name="col2" value="6"/> 358 <param name="col2" value="6" />
360 <output name="outfile" file="mv_result02.tabular" lines_diff="14"/> 359 <output name="outfile" file="mv_result02.tabular" lines_diff="14" />
361 </test> 360 </test>
362 <test> 361 <test>
363 <param name="infile_estimator" value="pipeline05"/> 362 <param name="infile_estimator" value="pipeline05" />
364 <param name="selected_function" value="learning_curve"/> 363 <param name="selected_function" value="learning_curve" />
365 <param name="infile1" value="regression_X.tabular" ftype="tabular"/> 364 <param name="infile1" value="regression_X.tabular" ftype="tabular" />
366 <param name="header1" value="true" /> 365 <param name="header1" value="true" />
367 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/> 366 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17" />
368 <param name="infile2" value="regression_y.tabular" ftype="tabular"/> 367 <param name="infile2" value="regression_y.tabular" ftype="tabular" />
369 <param name="header2" value="true" /> 368 <param name="header2" value="true" />
370 <param name="col2" value="1"/> 369 <param name="col2" value="1" />
371 <output name="outfile" file="mv_result03.tabular"/> 370 <output name="outfile" file="mv_result03.tabular" />
372 </test> 371 </test>
373 <test> 372 <test>
374 <param name="infile_estimator" value="pipeline05"/> 373 <param name="infile_estimator" value="pipeline05" />
375 <param name="selected_function" value="permutation_test_score"/> 374 <param name="selected_function" value="permutation_test_score" />
376 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> 375 <param name="infile1" value="regression_train.tabular" ftype="tabular" />
377 <param name="col1" value="1,2,3,4,5"/> 376 <param name="col1" value="1,2,3,4,5" />
378 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> 377 <param name="infile2" value="regression_train.tabular" ftype="tabular" />
379 <param name="col2" value="6"/> 378 <param name="col2" value="6" />
380 <output name="outfile"> 379 <output name="outfile">
381 <assert_contents> 380 <assert_contents>
382 <has_n_columns n="3"/> 381 <has_n_columns n="3" />
383 <has_text text="0.25697059258228816"/> 382 <has_text text="0.25697059258228816" />
384 </assert_contents> 383 </assert_contents>
385 </output> 384 </output>
386 </test> 385 </test>
387 <test> 386 <test>
388 <param name="infile_estimator" value="pipeline05"/> 387 <param name="infile_estimator" value="pipeline05" />
389 <param name="selected_function" value="cross_val_predict"/> 388 <param name="selected_function" value="cross_val_predict" />
390 <section name="groups_selector"> 389 <section name="groups_selector">
391 <param name="infile_groups" value="regression_y.tabular" ftype="tabular"/> 390 <param name="infile_groups" value="regression_y.tabular" ftype="tabular" />
392 <param name="header_g" value="true"/> 391 <param name="header_g" value="true" />
393 <param name="selected_column_selector_option_g" value="by_index_number"/> 392 <param name="selected_column_selector_option_g" value="by_index_number" />
394 <param name="col_g" value="1"/> 393 <param name="col_g" value="1" />
395 </section> 394 </section>
396 <param name="selected_cv" value="GroupKFold"/> 395 <param name="selected_cv" value="GroupKFold" />
397 <param name="infile1" value="regression_X.tabular" ftype="tabular"/> 396 <param name="infile1" value="regression_X.tabular" ftype="tabular" />
398 <param name="header1" value="true"/> 397 <param name="header1" value="true" />
399 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/> 398 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17" />
400 <param name="infile2" value="regression_y.tabular" ftype="tabular"/> 399 <param name="infile2" value="regression_y.tabular" ftype="tabular" />
401 <param name="header2" value="true"/> 400 <param name="header2" value="true" />
402 <param name="col2" value="1"/> 401 <param name="col2" value="1" />
403 <output name="outfile" file="mv_result05.tabular"/> 402 <output name="outfile" file="mv_result05.tabular" />
404 </test> 403 </test>
405 </tests> 404 </tests>
406 <help> 405 <help>
407 <![CDATA[ 406 <![CDATA[
408 **What it does** 407 **What it does**
412 411
413 .. _`Scikit-learn model_selection`: http://scikit-learn.org/stable/modules/classes.html#module-sklearn.model_selection 412 .. _`Scikit-learn model_selection`: http://scikit-learn.org/stable/modules/classes.html#module-sklearn.model_selection
414 ]]> 413 ]]>
415 </help> 414 </help>
416 <expand macro="sklearn_citation"> 415 <expand macro="sklearn_citation">
417 <expand macro="skrebate_citation"/> 416 <expand macro="skrebate_citation" />
418 <expand macro="xgboost_citation"/> 417 <expand macro="xgboost_citation" />
419 </expand> 418 </expand>
420 </tool> 419 </tool>