comparison model_validation.xml @ 24:a5aed87b2cc0 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 5b2ac730ec6d3b762faa9034eddd19ad1b347476"
author bgruening
date Mon, 16 Dec 2019 05:28:32 -0500
parents 887e0aaa482e
children 9b017b0da56e
comparison
equal deleted inserted replaced
23:56f6ebf69ddc 24:a5aed87b2cc0
1 <tool id="sklearn_model_validation" name="Model Validation" version="@VERSION@"> 1 <tool id="sklearn_model_validation" name="Model Validation" version="@VERSION@">
2 <description>evaluates estimator performances without changing parameters</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"/>
18 <![CDATA[ 18 <![CDATA[
19 import imblearn 19 import imblearn
20 import joblib 20 import joblib
21 import json 21 import json
22 import numpy as np 22 import numpy as np
23 import os
23 import pandas as pd 24 import pandas as pd
24 import pickle 25 import pickle
25 import pprint 26 import pprint
26 import skrebate 27 import skrebate
27 import sys 28 import sys
40 from galaxy_ml.model_validations import _fit_and_score 41 from galaxy_ml.model_validations import _fit_and_score
41 42
42 43
43 setattr(_validation, '_fit_and_score', _fit_and_score) 44 setattr(_validation, '_fit_and_score', _fit_and_score)
44 45
45 N_JOBS = int(__import__('os').environ.get('GALAXY_SLOTS', 1)) 46 N_JOBS = int(os.environ.get('GALAXY_SLOTS', 1))
46 CACHE_DIR = './cached' 47 CACHE_DIR = os.path.join(os.getcwd(), 'cached')
48 del os
47 ALLOWED_CALLBACKS = ('EarlyStopping', 'TerminateOnNaN', 'ReduceLROnPlateau', 49 ALLOWED_CALLBACKS = ('EarlyStopping', 'TerminateOnNaN', 'ReduceLROnPlateau',
48 'CSVLogger', 'None') 50 'CSVLogger', 'None')
49 51
50 warnings.filterwarnings('ignore') 52 warnings.filterwarnings('ignore')
51 53
276 </param> 278 </param>
277 <when value="cross_validate"> 279 <when value="cross_validate">
278 <section name="options" title="Other Options" expanded="false"> 280 <section name="options" title="Other Options" expanded="false">
279 <expand macro="scoring_selection"/> 281 <expand macro="scoring_selection"/>
280 <expand macro="model_validation_common_options"/> 282 <expand macro="model_validation_common_options"/>
281 <!--param argument="return_train_score" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" 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."/>
282 <!--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."/> -->
283 <!--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."/> -->
284 <!--fit_params--> 286 <!--fit_params-->
285 <expand macro="pre_dispatch"/> 287 <expand macro="pre_dispatch"/>
286 </section> 288 </section>
332 </outputs> 334 </outputs>
333 <tests> 335 <tests>
334 <test> 336 <test>
335 <param name="infile_estimator" value="pipeline02"/> 337 <param name="infile_estimator" value="pipeline02"/>
336 <param name="selected_function" value="cross_validate"/> 338 <param name="selected_function" value="cross_validate"/>
339 <param name="return_train_score" value="True"/>
337 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> 340 <param name="infile1" value="regression_train.tabular" ftype="tabular"/>
338 <param name="col1" value="1,2,3,4,5"/> 341 <param name="col1" value="1,2,3,4,5"/>
339 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> 342 <param name="infile2" value="regression_train.tabular" ftype="tabular"/>
340 <param name="col2" value="6"/> 343 <param name="col2" value="6"/>
341 <output name="outfile"> 344 <output name="outfile">