Mercurial > repos > bgruening > sklearn_model_validation
comparison model_validation.xml @ 17:971a2f6a790b draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit c0a3a186966888e5787335a7628bf0a4382637e7
| author | bgruening |
|---|---|
| date | Tue, 14 May 2019 17:58:27 -0400 |
| parents | 1c8109082a18 |
| children | d6822c37f0ba |
comparison
equal
deleted
inserted
replaced
| 16:1c8109082a18 | 17:971a2f6a790b |
|---|---|
| 13 </command> | 13 </command> |
| 14 <configfiles> | 14 <configfiles> |
| 15 <inputs name="inputs" /> | 15 <inputs name="inputs" /> |
| 16 <configfile name="sklearn_model_validation_script"> | 16 <configfile name="sklearn_model_validation_script"> |
| 17 <![CDATA[ | 17 <![CDATA[ |
| 18 import imblearn | |
| 19 import json | |
| 20 import numpy as np | |
| 21 import pandas as pd | |
| 22 import pickle | |
| 23 import pprint | |
| 24 import skrebate | |
| 18 import sys | 25 import sys |
| 19 import os | 26 import warnings |
| 20 import json | 27 import xgboost |
| 21 import pandas | 28 from mlxtend import classifier, regressor |
| 22 import numpy as np | 29 from sklearn import ( |
| 23 from sklearn import preprocessing, model_selection, svm, linear_model, ensemble, naive_bayes, tree, neighbors | 30 cluster, compose, decomposition, ensemble, feature_extraction, |
| 24 from sklearn.pipeline import Pipeline | 31 feature_selection, gaussian_process, kernel_approximation, metrics, |
| 25 | 32 model_selection, naive_bayes, neighbors, pipeline, preprocessing, |
| 26 exec(open('$__tool_directory__/utils.py').read(), globals()) | 33 svm, linear_model, tree, discriminant_analysis) |
| 34 | |
| 35 sys.path.insert(0, '$__tool_directory__') | |
| 36 from utils import SafeEval, get_cv, get_scoring, load_model, read_columns | |
| 37 | |
| 38 N_JOBS = int(__import__('os').environ.get('GALAXY_SLOTS', 1)) | |
| 27 | 39 |
| 28 warnings.filterwarnings('ignore') | 40 warnings.filterwarnings('ignore') |
| 29 | 41 |
| 30 safe_eval = SafeEval() | 42 safe_eval = SafeEval() |
| 31 | 43 |
| 32 input_json_path = sys.argv[1] | 44 input_json_path = sys.argv[1] |
| 33 with open(input_json_path, 'r') as param_handler: | 45 with open(input_json_path, 'r') as param_handler: |
| 34 params = json.load(param_handler) | 46 params = json.load(param_handler) |
| 47 | |
| 48 #if $model_validation_functions.options.cv_selector.selected_cv\ | |
| 49 in ['GroupKFold', 'GroupShuffleSplit', 'LeaveOneGroupOut', 'LeavePGroupsOut']: | |
| 50 params['model_validation_functions']['options']['cv_selector']['groups_selector']['infile_g'] =\ | |
| 51 '$model_validation_functions.options.cv_selector.groups_selector.infile_g' | |
| 52 #end if | |
| 35 | 53 |
| 36 input_type = params['input_options']['selected_input'] | 54 input_type = params['input_options']['selected_input'] |
| 37 if input_type == 'tabular': | 55 if input_type == 'tabular': |
| 38 header = 'infer' if params['input_options']['header1'] else None | 56 header = 'infer' if params['input_options']['header1'] else None |
| 39 column_option = params['input_options']['column_selector_options_1']['selected_column_selector_option'] | 57 column_option = params['input_options']['column_selector_options_1']['selected_column_selector_option'] |
| 45 '$input_options.infile1', | 63 '$input_options.infile1', |
| 46 c = c, | 64 c = c, |
| 47 c_option = column_option, | 65 c_option = column_option, |
| 48 sep='\t', | 66 sep='\t', |
| 49 header=header, | 67 header=header, |
| 50 parse_dates=True | 68 parse_dates=True).astype(float) |
| 51 ) | |
| 52 else: | 69 else: |
| 53 X = mmread('$input_options.infile1') | 70 X = mmread('$input_options.infile1') |
| 54 | 71 |
| 55 header = 'infer' if params['input_options']['header2'] else None | 72 header = 'infer' if params['input_options']['header2'] else None |
| 56 column_option = params['input_options']['column_selector_options_2']['selected_column_selector_option2'] | 73 column_option = params['input_options']['column_selector_options_2']['selected_column_selector_option2'] |
| 62 '$input_options.infile2', | 79 '$input_options.infile2', |
| 63 c = c, | 80 c = c, |
| 64 c_option = column_option, | 81 c_option = column_option, |
| 65 sep='\t', | 82 sep='\t', |
| 66 header=header, | 83 header=header, |
| 67 parse_dates=True | 84 parse_dates=True) |
| 68 ) | 85 y = y.ravel() |
| 69 y=y.ravel() | 86 |
| 70 | 87 ## handle options |
| 71 options = params['model_validation_functions']['options'] | 88 options = params['model_validation_functions']['options'] |
| 72 splitter, groups = get_cv( options.pop('cv_selector') ) | 89 splitter, groups = get_cv( options.pop('cv_selector') ) |
| 73 if groups is None: | 90 options['cv'] = splitter |
| 74 options['cv'] = splitter | 91 options['groups'] = groups |
| 75 elif groups == '': | |
| 76 options['cv'] = list( splitter.split(X, y, groups=None) ) | |
| 77 else: | |
| 78 options['cv'] = list( splitter.split(X, y, groups=groups) ) | |
| 79 options['n_jobs'] = N_JOBS | 92 options['n_jobs'] = N_JOBS |
| 80 if 'scoring' in options: | 93 if 'scoring' in options: |
| 94 primary_scoring = options['scoring']['primary_scoring'] | |
| 81 options['scoring'] = get_scoring(options['scoring']) | 95 options['scoring'] = get_scoring(options['scoring']) |
| 82 if 'pre_dispatch' in options and options['pre_dispatch'] == '': | 96 if 'pre_dispatch' in options and options['pre_dispatch'] == '': |
| 83 options['pre_dispatch'] = None | 97 options['pre_dispatch'] = None |
| 84 | 98 |
| 85 pipeline_steps = [] | 99 ## load pipeline |
| 86 | 100 with open('$infile_pipeline', 'rb') as pipeline_handler: |
| 87 ## Set up pre_processor and add to pipeline steps. | 101 pipeline = load_model(pipeline_handler) |
| 88 if params['pre_processing']['do_pre_processing'] == 'Yes': | |
| 89 preprocessor = params['pre_processing']['pre_processors']['selected_pre_processor'] | |
| 90 pre_processor_options = params['pre_processing']['pre_processors']['options'] | |
| 91 my_class = getattr(preprocessing, preprocessor) | |
| 92 pipeline_steps.append( ('pre_processor', my_class(**pre_processor_options)) ) | |
| 93 | |
| 94 ## Set up feature selector and add to pipeline steps. | |
| 95 if params['feature_selection']['do_feature_selection'] == 'Yes': | |
| 96 feature_selector = feature_selector(params['feature_selection']['fs_algorithm_selector']) | |
| 97 pipeline_steps.append( ('feature_selector', feature_selector) ) | |
| 98 | |
| 99 ## Set up estimator and add to pipeline. | |
| 100 estimator_json = params['model_validation_functions']['estimator_selector'] | |
| 101 estimator = get_estimator(estimator_json) | |
| 102 | |
| 103 pipeline_steps.append( ('estimator', estimator) ) | |
| 104 | |
| 105 pipeline = Pipeline(pipeline_steps) | |
| 106 | 102 |
| 107 ## Set up validator, run pipeline through validator and return results. | 103 ## Set up validator, run pipeline through validator and return results. |
| 108 | 104 |
| 109 validator = params['model_validation_functions']['selected_function'] | 105 validator = params['model_validation_functions']['selected_function'] |
| 110 validator = getattr(model_selection, validator) | 106 validator = getattr(model_selection, validator) |
| 111 | 107 |
| 112 selected_function = params['model_validation_functions']['selected_function'] | 108 selected_function = params['model_validation_functions']['selected_function'] |
| 113 rval_type = params['model_validation_functions'].get('return_type', None) | |
| 114 | 109 |
| 115 if selected_function == 'cross_validate': | 110 if selected_function == 'cross_validate': |
| 116 res = validator(pipeline, X, y, **options) | 111 res = validator(pipeline, X, y, **options) |
| 117 rval = res[rval_type] | 112 rval = pd.DataFrame(res) |
| 113 col_rename = {} | |
| 114 for col in rval.columns: | |
| 115 if col.endswith('_primary'): | |
| 116 col_rename[col] = col[:-7] + primary_scoring | |
| 117 rval.rename(inplace=True, columns=col_rename) | |
| 118 elif selected_function == 'cross_val_predict': | |
| 119 predicted = validator(pipeline, X, y, **options) | |
| 120 if len(predicted.shape) == 1: | |
| 121 rval = pd.DataFrame(predicted, columns=['Predicted']) | |
| 122 else: | |
| 123 rval = pd.DataFrame(predicted) | |
| 118 elif selected_function == 'learning_curve': | 124 elif selected_function == 'learning_curve': |
| 119 options['train_sizes'] = eval(options['train_sizes']) | 125 try: |
| 126 train_sizes = safe_eval(options['train_sizes']) | |
| 127 except: | |
| 128 sys.exit("Unsupported train_sizes input! Supports int/float in tuple and array-like structure.") | |
| 129 if type(train_sizes) is tuple: | |
| 130 train_sizes = np.linspace(*train_sizes) | |
| 131 options['train_sizes'] = train_sizes | |
| 120 train_sizes_abs, train_scores, test_scores = validator(pipeline, X, y, **options) | 132 train_sizes_abs, train_scores, test_scores = validator(pipeline, X, y, **options) |
| 121 rval = eval(rval_type) | 133 rval = pd.DataFrame(dict( |
| 134 train_sizes_abs = train_sizes_abs, | |
| 135 mean_train_scores = np.mean(train_scores, axis=1), | |
| 136 std_train_scores = np.std(train_scores, axis=1), | |
| 137 mean_test_scores = np.mean(test_scores, axis=1), | |
| 138 std_test_scores = np.std(test_scores, axis=1))) | |
| 139 rval = rval[['train_sizes_abs', 'mean_train_scores', 'std_train_scores', | |
| 140 'mean_test_scores', 'std_test_scores']] | |
| 122 elif selected_function == 'permutation_test_score': | 141 elif selected_function == 'permutation_test_score': |
| 123 score, permutation_scores, pvalue = validator(pipeline, X, y, **options) | 142 score, permutation_scores, pvalue = validator(pipeline, X, y, **options) |
| 124 rval = eval(rval_type) | 143 permutation_scores_df = pd.DataFrame(dict( |
| 125 if rval_type in ['score', 'pvalue']: | 144 permutation_scores = permutation_scores)) |
| 126 rval = [rval] | 145 score_df = pd.DataFrame(dict( |
| 127 elif selected_function == 'validation_curve': | 146 score = [score], |
| 128 options['param_name'] = 'estimator__' + options['param_name'] | 147 pvalue = [pvalue])) |
| 129 options['param_range'] = eval(options['param_range']) | 148 rval = pd.concat([score_df[['score', 'pvalue']], permutation_scores_df], axis=1) |
| 130 train_scores, test_scores = validator(pipeline, X, y, **options) | 149 |
| 131 rval = eval(rval_type) | 150 rval.to_csv(path_or_buf='$outfile', sep='\t', header=True, index=False) |
| 132 else: | |
| 133 rval = validator(pipeline, X, y, **options) | |
| 134 | |
| 135 rval = pandas.DataFrame(rval) | |
| 136 rval.to_csv(path_or_buf='$outfile', sep='\t', header=False, index=False) | |
| 137 | 151 |
| 138 ]]> | 152 ]]> |
| 139 </configfile> | 153 </configfile> |
| 140 </configfiles> | 154 </configfiles> |
| 141 <inputs> | 155 <inputs> |
| 142 <conditional name="pre_processing"> | 156 <param name="infile_pipeline" type="data" format="zip" label="Choose the dataset containing model/pipeline object"/> |
| 143 <param name="do_pre_processing" type="select" label="Do pre_processing?"> | |
| 144 <option value="No" selected="true"/> | |
| 145 <option value="Yes"/> | |
| 146 </param> | |
| 147 <when value="No"/> | |
| 148 <when value="Yes"> | |
| 149 <conditional name="pre_processors"> | |
| 150 <expand macro="sparse_preprocessors_ext" /> | |
| 151 <expand macro="sparse_preprocessor_options_ext" /> | |
| 152 </conditional> | |
| 153 </when> | |
| 154 </conditional> | |
| 155 <conditional name="feature_selection"> | |
| 156 <param name="do_feature_selection" type="select" label="Do feature selection?"> | |
| 157 <option value="No" selected="true"/> | |
| 158 <option value="Yes"/> | |
| 159 </param> | |
| 160 <when value="No"/> | |
| 161 <when value="Yes"> | |
| 162 <expand macro="feature_selection_pipeline"/> | |
| 163 </when> | |
| 164 </conditional> | |
| 165 <conditional name="model_validation_functions"> | 157 <conditional name="model_validation_functions"> |
| 166 <param name="selected_function" type="select" label="Select a model validation function"> | 158 <param name="selected_function" type="select" label="Select a model validation function"> |
| 167 <option value="cross_validate">cross_validate - Evaluate metric(s) by cross-validation and also record fit/score times</option> | 159 <option value="cross_validate">cross_validate - Evaluate metric(s) by cross-validation and also record fit/score times</option> |
| 168 <option value="cross_val_predict">cross_val_predict - Generate cross-validated estimates for each input data point</option> | 160 <option value="cross_val_predict">cross_val_predict - Generate cross-validated estimates for each input data point</option> |
| 169 <option value="cross_val_score">cross_val_score - Evaluate a score by cross-validation</option> | |
| 170 <option value="learning_curve">learning_curve - Learning curve</option> | 161 <option value="learning_curve">learning_curve - Learning curve</option> |
| 171 <option value="permutation_test_score">permutation_test_score - Evaluate the significance of a cross-validated score with permutations</option> | 162 <option value="permutation_test_score">permutation_test_score - Evaluate the significance of a cross-validated score with permutations</option> |
| 172 <option value="validation_curve">validation_curve - Validation curve</option> | 163 <option value="validation_curve">validation_curve - Use grid search with one parameter instead</option> |
| 173 </param> | 164 </param> |
| 174 <when value="cross_validate"> | 165 <when value="cross_validate"> |
| 175 <expand macro="estimator_selector_all" /> | |
| 176 <section name="options" title="Other Options" expanded="false"> | 166 <section name="options" title="Other Options" expanded="false"> |
| 177 <!--groups--> | 167 <expand macro="scoring_selection"/> |
| 178 <expand macro="model_validation_common_options"/> | 168 <expand macro="model_validation_common_options"/> |
| 179 <expand macro="scoring_selection"/> | 169 <!--param argument="return_train_score" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" help="Whether to include train scores."/> --> |
| 170 <!--param argument="return_estimator" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" help="Whether to return the estimators fitted on each split."/> --> | |
| 171 <!--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."/> --> | |
| 180 <!--fit_params--> | 172 <!--fit_params--> |
| 181 <expand macro="pre_dispatch"/> | 173 <expand macro="pre_dispatch"/> |
| 182 </section> | 174 </section> |
| 183 <param name="return_type" type="select" label="Select a return type"> | |
| 184 <option value="test_score" selected="true">test_score</option> | |
| 185 <option value="train_score">train_score</option> | |
| 186 <option value="fit_time">fit_time</option> | |
| 187 <option value="score_time">score_time</option> | |
| 188 </param> | |
| 189 </when> | 175 </when> |
| 190 <when value="cross_val_predict"> | 176 <when value="cross_val_predict"> |
| 191 <expand macro="estimator_selector_all" /> | |
| 192 <section name="options" title="Other Options" expanded="false"> | 177 <section name="options" title="Other Options" expanded="false"> |
| 193 <!--groups--> | |
| 194 <expand macro="model_validation_common_options" /> | 178 <expand macro="model_validation_common_options" /> |
| 195 <!--fit_params--> | 179 <!--fit_params--> |
| 196 <expand macro="pre_dispatch" value="2*n_jobs’" help="Controls the number of jobs that get dispatched during parallel execution"/> | 180 <expand macro="pre_dispatch" value="2*n_jobs’" help="Controls the number of jobs that get dispatched during parallel execution"/> |
| 197 <param argument="method" type="select" label="Invokes the passed method name of the passed estimator"> | 181 <param argument="method" type="select" label="Invokes the passed method name of the passed estimator"> |
| 198 <option value="predict" selected="true">predict</option> | 182 <option value="predict" selected="true">predict</option> |
| 199 <option value="predict_proba">predict_proba</option> | 183 <option value="predict_proba">predict_proba</option> |
| 200 </param> | 184 </param> |
| 201 </section> | 185 </section> |
| 202 </when> | 186 </when> |
| 203 <when value="cross_val_score"> | 187 <when value="learning_curve"> |
| 204 <expand macro="estimator_selector_all" /> | |
| 205 <section name="options" title="Other Options" expanded="false"> | 188 <section name="options" title="Other Options" expanded="false"> |
| 206 <!--groups--> | 189 <expand macro="scoring_selection"/> |
| 207 <expand macro="model_validation_common_options"/> | 190 <expand macro="model_validation_common_options"/> |
| 208 <expand macro="scoring_selection"/> | 191 <param argument="train_sizes" type="text" value="(0.1, 1.0, 5)" label="train_sizes" |
| 209 <!--fit_params--> | 192 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.]"> |
| 193 <sanitizer> | |
| 194 <valid initial="default"> | |
| 195 <add value="["/> | |
| 196 <add value="]"/> | |
| 197 </valid> | |
| 198 </sanitizer> | |
| 199 </param> | |
| 200 <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"/> | |
| 210 <expand macro="pre_dispatch"/> | 201 <expand macro="pre_dispatch"/> |
| 202 <expand macro="shuffle" checked="false" label="shuffle" help="Whether to shuffle training data before taking prefixes"/> | |
| 203 <expand macro="random_state" help_text="If int, the seed used by the random number generator. Used when `shuffle` is True"/> | |
| 211 </section> | 204 </section> |
| 212 </when> | 205 </when> |
| 213 <when value="learning_curve"> | 206 <when value="permutation_test_score"> |
| 214 <expand macro="estimator_selector_all" /> | |
| 215 <section name="options" title="Other Options" expanded="false"> | 207 <section name="options" title="Other Options" expanded="false"> |
| 216 <!--groups--> | 208 <expand macro="scoring_selection"/> |
| 217 <expand macro="model_validation_common_options"/> | 209 <expand macro="model_validation_common_options"/> |
| 218 <param argument="train_sizes" type="text" value="np.linspace(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"/> | |
| 219 <expand macro="scoring_selection"/> | |
| 220 <param argument="exploit_incremental_learning" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="exploit_incremental_learning" help="Whether to apply incremental learning to speed up fitting of the estimator if supported"/> | |
| 221 <expand macro="pre_dispatch"/> | |
| 222 <expand macro="shuffle" checked="false" label="shuffle" help="Whether to shuffle training data before taking prefixes"/> | |
| 223 <expand macro="random_state"/> | |
| 224 </section> | |
| 225 <param name="return_type" type="select" label="Select a return type"> | |
| 226 <option value="train_sizes_abs" selected="true">train_sizes_abs</option> | |
| 227 <option value="train_scores">train_scores</option> | |
| 228 <option value="test_scores">test_scores</option> | |
| 229 </param> | |
| 230 </when> | |
| 231 <when value="permutation_test_score"> | |
| 232 <expand macro="estimator_selector_all" /> | |
| 233 <section name="options" title="Other Options" expanded="false"> | |
| 234 <!--groups--> | |
| 235 <expand macro="model_validation_common_options"/> | |
| 236 <expand macro="scoring_selection"/> | |
| 237 <param name="n_permutations" type="integer" value="100" optional="true" label="n_permutations" help="Number of times to permute y"/> | 210 <param name="n_permutations" type="integer" value="100" optional="true" label="n_permutations" help="Number of times to permute y"/> |
| 238 <expand macro="random_state"/> | 211 <expand macro="random_state"/> |
| 239 </section> | 212 </section> |
| 240 <param name="return_type" type="select" label="Select a return type"> | |
| 241 <option value="score" selected="true">score</option> | |
| 242 <option value="permutation_scores">permutation_scores</option> | |
| 243 <option value="pvalue">pvalue</option> | |
| 244 </param> | |
| 245 </when> | 213 </when> |
| 246 <when value="validation_curve"> | 214 <when value="validation_curve"/> |
| 247 <expand macro="estimator_selector_all" /> | |
| 248 <section name="options" title="Other Options" expanded="false"> | |
| 249 <param name="param_name" type="text" value="gamma" label="param_name" help="Name of the parameter that will be varied"/> | |
| 250 <param name="param_range" type="text" value="np.logspace(-6, -1, 5)" label="param_range" help="The values of the parameter that will be evaluated."/> | |
| 251 <!--groups--> | |
| 252 <expand macro="model_validation_common_options"/> | |
| 253 <expand macro="scoring_selection"/> | |
| 254 <expand macro="pre_dispatch"/> | |
| 255 </section> | |
| 256 <param name="return_type" type="select" label="Select a return type"> | |
| 257 <option value="train_scores" selected="true">train_scores</option> | |
| 258 <option value="test_scores">test_scores</option> | |
| 259 </param> | |
| 260 </when> | |
| 261 </conditional> | 215 </conditional> |
| 262 <expand macro="sl_mixed_input"/> | 216 <expand macro="sl_mixed_input"/> |
| 263 </inputs> | 217 </inputs> |
| 264 <outputs> | 218 <outputs> |
| 265 <data format="tabular" name="outfile"/> | 219 <data format="tabular" name="outfile"/> |
| 266 </outputs> | 220 </outputs> |
| 267 <tests> | 221 <tests> |
| 268 <test> | 222 <test> |
| 223 <param name="infile_pipeline" value="pipeline02"/> | |
| 269 <param name="selected_function" value="cross_validate"/> | 224 <param name="selected_function" value="cross_validate"/> |
| 270 <param name="selected_module" value="linear_model"/> | |
| 271 <param name="selected_estimator" value="LassoCV"/> | |
| 272 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> | 225 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> |
| 273 <param name="col1" value="1,2,3,4,5"/> | 226 <param name="col1" value="1,2,3,4,5"/> |
| 274 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> | 227 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> |
| 275 <param name="col2" value="6"/> | 228 <param name="col2" value="6"/> |
| 276 <output name="outfile" file="mv_result01.tabular"/> | 229 <output name="outfile"> |
| 277 </test> | 230 <assert_contents> |
| 278 <test> | 231 <has_n_columns n="4"/> |
| 232 <has_text text="0.9999961390418067"/> | |
| 233 <has_text text="0.9944541531269271"/> | |
| 234 <has_text text="0.9999193322454393"/> | |
| 235 </assert_contents> | |
| 236 </output> | |
| 237 </test> | |
| 238 <test> | |
| 239 <param name="infile_pipeline" value="pipeline02"/> | |
| 279 <param name="selected_function" value="cross_val_predict"/> | 240 <param name="selected_function" value="cross_val_predict"/> |
| 280 <param name="selected_module" value="linear_model"/> | |
| 281 <param name="selected_estimator" value="LassoCV"/> | |
| 282 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> | 241 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> |
| 283 <param name="col1" value="1,2,3,4,5"/> | 242 <param name="col1" value="1,2,3,4,5"/> |
| 284 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> | 243 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> |
| 285 <param name="col2" value="6"/> | 244 <param name="col2" value="6"/> |
| 286 <output name="outfile" file="mv_result02.tabular"/> | 245 <output name="outfile" file="mv_result02.tabular" lines_diff="4"/> |
| 287 </test> | 246 </test> |
| 288 <test> | 247 <test> |
| 289 <param name="selected_function" value="cross_val_score"/> | 248 <param name="infile_pipeline" value="pipeline05"/> |
| 290 <param name="selected_module" value="linear_model"/> | |
| 291 <param name="selected_estimator" value="LassoCV"/> | |
| 292 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> | |
| 293 <param name="col1" value="1,2,3,4,5"/> | |
| 294 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> | |
| 295 <param name="col2" value="6"/> | |
| 296 <output name="outfile" file="mv_result03.tabular"/> | |
| 297 </test> | |
| 298 <test> | |
| 299 <param name="selected_function" value="learning_curve"/> | 249 <param name="selected_function" value="learning_curve"/> |
| 300 <param name="selected_module" value="linear_model"/> | |
| 301 <param name="selected_estimator" value="LassoCV"/> | |
| 302 <param name="infile1" value="regression_X.tabular" ftype="tabular"/> | 250 <param name="infile1" value="regression_X.tabular" ftype="tabular"/> |
| 303 <param name="header1" value="true" /> | 251 <param name="header1" value="true" /> |
| 304 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/> | 252 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/> |
| 305 <param name="infile2" value="regression_y.tabular" ftype="tabular"/> | 253 <param name="infile2" value="regression_y.tabular" ftype="tabular"/> |
| 306 <param name="header2" value="true" /> | 254 <param name="header2" value="true" /> |
| 307 <param name="col2" value="1"/> | 255 <param name="col2" value="1"/> |
| 308 <output name="outfile" file="mv_result04.tabular"/> | 256 <output name="outfile" file="mv_result03.tabular"/> |
| 309 </test> | 257 </test> |
| 310 <test> | 258 <test> |
| 259 <param name="infile_pipeline" value="pipeline05"/> | |
| 311 <param name="selected_function" value="permutation_test_score"/> | 260 <param name="selected_function" value="permutation_test_score"/> |
| 312 <param name="selected_module" value="linear_model"/> | |
| 313 <param name="selected_estimator" value="LassoCV"/> | |
| 314 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> | 261 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> |
| 315 <param name="col1" value="1,2,3,4,5"/> | 262 <param name="col1" value="1,2,3,4,5"/> |
| 316 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> | 263 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> |
| 317 <param name="col2" value="6"/> | 264 <param name="col2" value="6"/> |
| 265 <output name="outfile"> | |
| 266 <assert_contents> | |
| 267 <has_n_columns n="3"/> | |
| 268 <has_text text="0.25697059258228816"/> | |
| 269 </assert_contents> | |
| 270 </output> | |
| 271 </test> | |
| 272 <test> | |
| 273 <param name="infile_pipeline" value="pipeline05"/> | |
| 274 <param name="selected_function" value="cross_val_predict"/> | |
| 275 <section name="groups_selector"> | |
| 276 <param name="infile_groups" value="regression_y.tabular" ftype="tabular"/> | |
| 277 <param name="header_g" value="true"/> | |
| 278 <param name="selected_column_selector_option_g" value="by_index_number"/> | |
| 279 <param name="col_g" value="1"/> | |
| 280 </section> | |
| 281 <param name="selected_cv" value="GroupKFold"/> | |
| 282 <param name="infile1" value="regression_X.tabular" ftype="tabular"/> | |
| 283 <param name="header1" value="true"/> | |
| 284 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/> | |
| 285 <param name="infile2" value="regression_y.tabular" ftype="tabular"/> | |
| 286 <param name="header2" value="true"/> | |
| 287 <param name="col2" value="1"/> | |
| 318 <output name="outfile" file="mv_result05.tabular"/> | 288 <output name="outfile" file="mv_result05.tabular"/> |
| 319 </test> | |
| 320 <test> | |
| 321 <param name="selected_function" value="validation_curve"/> | |
| 322 <param name="selected_module" value="svm"/> | |
| 323 <param name="selected_estimator" value="SVC"/> | |
| 324 <param name="text_params" value="kernel='linear'"/> | |
| 325 <param name="infile1" value="regression_X.tabular" ftype="tabular"/> | |
| 326 <param name="header1" value="true" /> | |
| 327 <param name="selected_column_selector_option" value="all_columns"/> | |
| 328 <param name="infile2" value="regression_y.tabular" ftype="tabular"/> | |
| 329 <param name="header2" value="true" /> | |
| 330 <param name="col2" value="1"/> | |
| 331 <param name="return_type" value="test_scores"/> | |
| 332 <output name="outfile" file="mv_result06.tabular"/> | |
| 333 </test> | 289 </test> |
| 334 </tests> | 290 </tests> |
| 335 <help> | 291 <help> |
| 336 <