diff 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
line wrap: on
line diff
--- a/model_validation.xml	Thu Nov 07 05:35:17 2019 -0500
+++ b/model_validation.xml	Mon Dec 16 05:28:32 2019 -0500
@@ -1,5 +1,5 @@
 <tool id="sklearn_model_validation" name="Model Validation" version="@VERSION@">
-    <description>evaluates estimator performances without changing parameters</description>
+    <description>includes cross_validate, cross_val_predict, learning_curve, and more</description>
     <macros>
         <import>main_macros.xml</import>
     </macros>
@@ -20,6 +20,7 @@
 import joblib
 import json
 import numpy as np
+import os
 import pandas as pd
 import pickle
 import pprint
@@ -42,8 +43,9 @@
 
 setattr(_validation, '_fit_and_score', _fit_and_score)
 
-N_JOBS = int(__import__('os').environ.get('GALAXY_SLOTS', 1))
-CACHE_DIR = './cached'
+N_JOBS = int(os.environ.get('GALAXY_SLOTS', 1))
+CACHE_DIR = os.path.join(os.getcwd(), 'cached')
+del os
 ALLOWED_CALLBACKS = ('EarlyStopping', 'TerminateOnNaN', 'ReduceLROnPlateau',
                      'CSVLogger', 'None')
 
@@ -278,7 +280,7 @@
                 <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="true" help="Whether to include train scores."/> -->
+                    <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-->
@@ -334,6 +336,7 @@
         <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"/>