diff 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
line wrap: on
line diff
--- a/model_validation.xml	Fri Oct 02 08:51:25 2020 +0000
+++ b/model_validation.xml	Tue Apr 13 19:01:30 2021 +0000
@@ -1,10 +1,10 @@
-<tool id="sklearn_model_validation" name="Model Validation" version="@VERSION@">
+<tool id="sklearn_model_validation" name="Model Validation" version="@VERSION@" profile="20.05">
     <description>includes cross_validate, cross_val_predict, learning_curve, and more</description>
     <macros>
         <import>main_macros.xml</import>
     </macros>
-    <expand macro="python_requirements"/>
-    <expand macro="macro_stdio"/>
+    <expand macro="python_requirements" />
+    <expand macro="macro_stdio" />
     <version_command>echo "@VERSION@"</version_command>
     <command>
         <![CDATA[
@@ -267,7 +267,7 @@
         </configfile>
     </configfiles>
     <inputs>
-        <param name="infile_estimator" type="data" format="zip" label="Choose the dataset containing model/pipeline object"/>
+        <param name="infile_estimator" type="data" format="zip" label="Choose the dataset containing model/pipeline object" />
         <conditional name="model_validation_functions">
             <param name="selected_function" type="select" label="Select a model validation function">
                 <option value="cross_validate">cross_validate - Evaluate metric(s) by cross-validation and also record fit/score times</option>
@@ -278,20 +278,20 @@
             </param>
             <when value="cross_validate">
                 <section name="options" title="Other Options" expanded="false">
-                    <expand macro="scoring_selection"/>
-                    <expand macro="model_validation_common_options"/>
-                    <param argument="return_train_score" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" help="Whether to include train scores."/>
+                    <expand macro="scoring_selection" />
+                    <expand macro="model_validation_common_options" />
+                    <param argument="return_train_score" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" help="Whether to include train scores." />
                     <!--param argument="return_estimator" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" help="Whether to return the estimators fitted on each split."/> -->
                     <!--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."/> -->
                     <!--fit_params-->
-                    <expand macro="pre_dispatch"/>
+                    <expand macro="pre_dispatch" />
                 </section>
             </when>
             <when value="cross_val_predict">
                 <section name="options" title="Other Options" expanded="false">
                     <expand macro="model_validation_common_options" />
                     <!--fit_params-->
-                    <expand macro="pre_dispatch" value="2*n_jobs’" help="Controls the number of jobs that get dispatched during parallel execution"/>
+                    <expand macro="pre_dispatch" value="2*n_jobs’" help="Controls the number of jobs that get dispatched during parallel execution" />
                     <param argument="method" type="select" label="Invokes the passed method name of the passed estimator">
                         <option value="predict" selected="true">predict</option>
                         <option value="predict_proba">predict_proba</option>
@@ -300,107 +300,106 @@
             </when>
             <when value="learning_curve">
                 <section name="options" title="Other Options" expanded="false">
-                    <expand macro="scoring_selection"/>
-                    <expand macro="model_validation_common_options"/>
-                    <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.]">
+                    <expand macro="scoring_selection" />
+                    <expand macro="model_validation_common_options" />
+                    <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.]">
                         <sanitizer>
                             <valid initial="default">
-                                <add value="["/>
-                                <add value="]"/>
+                                <add value="[" />
+                                <add value="]" />
                             </valid>
                         </sanitizer>
                     </param>
-                    <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"/>
-                    <expand macro="pre_dispatch"/>
-                    <expand macro="shuffle" checked="false" label="shuffle" help="Whether to shuffle training data before taking prefixes"/>
-                    <expand macro="random_state" help_text="If int, the seed used by the random number generator. Used when `shuffle` is True"/>
+                    <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" />
+                    <expand macro="pre_dispatch" />
+                    <expand macro="shuffle" checked="false" label="shuffle" help="Whether to shuffle training data before taking prefixes" />
+                    <expand macro="random_state" help_text="If int, the seed used by the random number generator. Used when `shuffle` is True" />
                 </section>
             </when>
             <when value="permutation_test_score">
                 <section name="options" title="Other Options" expanded="false">
-                    <expand macro="scoring_selection"/>
-                    <expand macro="model_validation_common_options"/>
-                    <param name="n_permutations" type="integer" value="100" optional="true" label="n_permutations" help="Number of times to permute y"/>
-                    <expand macro="random_state"/>
+                    <expand macro="scoring_selection" />
+                    <expand macro="model_validation_common_options" />
+                    <param name="n_permutations" type="integer" value="100" optional="true" label="n_permutations" help="Number of times to permute y" />
+                    <expand macro="random_state" />
                 </section>
             </when>
-            <when value="validation_curve"/>
+            <when value="validation_curve" />
         </conditional>
-        <expand macro="sl_mixed_input_plus_sequence"/>
+        <expand macro="sl_mixed_input_plus_sequence" />
     </inputs>
     <outputs>
-        <data format="tabular" name="outfile"/>
+        <data format="tabular" name="outfile" />
     </outputs>
     <tests>
         <test>
-            <param name="infile_estimator" value="pipeline02"/>
-            <param name="selected_function" value="cross_validate"/>
-            <param name="return_train_score" value="True"/>
-            <param name="infile1" value="regression_train.tabular" ftype="tabular"/>
-            <param name="col1" value="1,2,3,4,5"/>
-            <param name="infile2" value="regression_train.tabular" ftype="tabular"/>
-            <param name="col2" value="6"/>
+            <param name="infile_estimator" value="pipeline02" />
+            <param name="selected_function" value="cross_validate" />
+            <param name="return_train_score" value="True" />
+            <param name="infile1" value="regression_train.tabular" ftype="tabular" />
+            <param name="col1" value="1,2,3,4,5" />
+            <param name="infile2" value="regression_train.tabular" ftype="tabular" />
+            <param name="col2" value="6" />
             <output name="outfile">
                 <assert_contents>
-                    <has_n_columns n="6"/>
-                    <has_text text="0.9999961390418067"/>
-                    <has_text text="0.9944541531269271"/>
-                    <has_text text="0.9999193322454393"/>
+                    <has_n_columns n="6" />
+                    <has_text text="0.9999961390418067" />
+                    <has_text text="0.9944541531269271" />
+                    <has_text text="0.9999193322454393" />
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="infile_estimator" value="pipeline02"/>
-            <param name="selected_function" value="cross_val_predict"/>
-            <param name="infile1" value="regression_train.tabular" ftype="tabular"/>
-            <param name="col1" value="1,2,3,4,5"/>
-            <param name="infile2" value="regression_train.tabular" ftype="tabular"/>
-            <param name="col2" value="6"/>
-            <output name="outfile" file="mv_result02.tabular" lines_diff="14"/>
+            <param name="infile_estimator" value="pipeline02" />
+            <param name="selected_function" value="cross_val_predict" />
+            <param name="infile1" value="regression_train.tabular" ftype="tabular" />
+            <param name="col1" value="1,2,3,4,5" />
+            <param name="infile2" value="regression_train.tabular" ftype="tabular" />
+            <param name="col2" value="6" />
+            <output name="outfile" file="mv_result02.tabular" lines_diff="14" />
         </test>
         <test>
-            <param name="infile_estimator" value="pipeline05"/>
-            <param name="selected_function" value="learning_curve"/>
-            <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
+            <param name="infile_estimator" value="pipeline05" />
+            <param name="selected_function" value="learning_curve" />
+            <param name="infile1" value="regression_X.tabular" ftype="tabular" />
             <param name="header1" value="true" />
-            <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
-            <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
+            <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17" />
+            <param name="infile2" value="regression_y.tabular" ftype="tabular" />
             <param name="header2" value="true" />
-            <param name="col2" value="1"/>
-            <output name="outfile" file="mv_result03.tabular"/>
+            <param name="col2" value="1" />
+            <output name="outfile" file="mv_result03.tabular" />
         </test>
         <test>
-            <param name="infile_estimator" value="pipeline05"/>
-            <param name="selected_function" value="permutation_test_score"/>
-            <param name="infile1" value="regression_train.tabular" ftype="tabular"/>
-            <param name="col1" value="1,2,3,4,5"/>
-            <param name="infile2" value="regression_train.tabular" ftype="tabular"/>
-            <param name="col2" value="6"/>
+            <param name="infile_estimator" value="pipeline05" />
+            <param name="selected_function" value="permutation_test_score" />
+            <param name="infile1" value="regression_train.tabular" ftype="tabular" />
+            <param name="col1" value="1,2,3,4,5" />
+            <param name="infile2" value="regression_train.tabular" ftype="tabular" />
+            <param name="col2" value="6" />
             <output name="outfile">
                 <assert_contents>
-                    <has_n_columns n="3"/>
-                    <has_text text="0.25697059258228816"/>
+                    <has_n_columns n="3" />
+                    <has_text text="0.25697059258228816" />
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="infile_estimator" value="pipeline05"/>
-            <param name="selected_function" value="cross_val_predict"/>
+            <param name="infile_estimator" value="pipeline05" />
+            <param name="selected_function" value="cross_val_predict" />
             <section name="groups_selector">
-                <param name="infile_groups" value="regression_y.tabular" ftype="tabular"/>
-                <param name="header_g" value="true"/>
-                <param name="selected_column_selector_option_g" value="by_index_number"/>
-                <param name="col_g" value="1"/>
+                <param name="infile_groups" value="regression_y.tabular" ftype="tabular" />
+                <param name="header_g" value="true" />
+                <param name="selected_column_selector_option_g" value="by_index_number" />
+                <param name="col_g" value="1" />
             </section>
-            <param name="selected_cv" value="GroupKFold"/>
-            <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
-            <param name="header1" value="true"/>
-            <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
-            <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
-            <param name="header2" value="true"/>
-            <param name="col2" value="1"/>
-            <output name="outfile" file="mv_result05.tabular"/>
+            <param name="selected_cv" value="GroupKFold" />
+            <param name="infile1" value="regression_X.tabular" ftype="tabular" />
+            <param name="header1" value="true" />
+            <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17" />
+            <param name="infile2" value="regression_y.tabular" ftype="tabular" />
+            <param name="header2" value="true" />
+            <param name="col2" value="1" />
+            <output name="outfile" file="mv_result05.tabular" />
         </test>
     </tests>
     <help>
@@ -414,7 +413,7 @@
         ]]>
     </help>
     <expand macro="sklearn_citation">
-        <expand macro="skrebate_citation"/>
-        <expand macro="xgboost_citation"/>
+        <expand macro="skrebate_citation" />
+        <expand macro="xgboost_citation" />
     </expand>
 </tool>