annotate model_validation.xml @ 17:cf9aa11b91c8 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
author bgruening
date Wed, 15 May 2019 07:42:07 -0400
parents 86e1e2874460
children efbec977a47d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
1 <tool id="sklearn_model_validation" name="Model Validation" version="@VERSION@">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
2 <description>evaluates estimator performance by cross-validation</description>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
3 <macros>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
4 <import>main_macros.xml</import>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
5 </macros>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
6 <expand macro="python_requirements"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
7 <expand macro="macro_stdio"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
8 <version_command>echo "@VERSION@"</version_command>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
9 <command>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
10 <![CDATA[
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
11 python "$sklearn_model_validation_script" '$inputs'
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
12 ]]>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
13 </command>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
14 <configfiles>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
15 <inputs name="inputs" />
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
16 <configfile name="sklearn_model_validation_script">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
17 <![CDATA[
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
18 import imblearn
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
19 import json
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
20 import numpy as np
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
21 import pandas as pd
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
22 import pickle
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
23 import pprint
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
24 import skrebate
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
25 import sys
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
26 import warnings
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
27 import xgboost
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
28 from mlxtend import classifier, regressor
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
29 from sklearn import (
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
30 cluster, compose, decomposition, ensemble, feature_extraction,
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
31 feature_selection, gaussian_process, kernel_approximation, metrics,
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
32 model_selection, naive_bayes, neighbors, pipeline, preprocessing,
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
33 svm, linear_model, tree, discriminant_analysis)
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
34
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
35 sys.path.insert(0, '$__tool_directory__')
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
36 from utils import SafeEval, get_cv, get_scoring, load_model, read_columns
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
37
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
38 N_JOBS = int(__import__('os').environ.get('GALAXY_SLOTS', 1))
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
39
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
40 warnings.filterwarnings('ignore')
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
41
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
42 safe_eval = SafeEval()
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
43
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
44 input_json_path = sys.argv[1]
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
45 with open(input_json_path, 'r') as param_handler:
8
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
46 params = json.load(param_handler)
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
47
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
48 #if $model_validation_functions.options.cv_selector.selected_cv\
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
49 in ['GroupKFold', 'GroupShuffleSplit', 'LeaveOneGroupOut', 'LeavePGroupsOut']:
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
50 params['model_validation_functions']['options']['cv_selector']['groups_selector']['infile_g'] =\
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
51 '$model_validation_functions.options.cv_selector.groups_selector.infile_g'
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
52 #end if
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
53
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
54 input_type = params['input_options']['selected_input']
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
55 if input_type == 'tabular':
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
56 header = 'infer' if params['input_options']['header1'] else None
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
57 column_option = params['input_options']['column_selector_options_1']['selected_column_selector_option']
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
58 if column_option in ['by_index_number', 'all_but_by_index_number', 'by_header_name', 'all_but_by_header_name']:
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
59 c = params['input_options']['column_selector_options_1']['col1']
3
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
60 else:
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
61 c = None
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
62 X = read_columns(
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
63 '$input_options.infile1',
3
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
64 c = c,
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
65 c_option = column_option,
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
66 sep='\t',
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
67 header=header,
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
68 parse_dates=True).astype(float)
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
69 else:
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
70 X = mmread('$input_options.infile1')
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
71
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
72 header = 'infer' if params['input_options']['header2'] else None
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
73 column_option = params['input_options']['column_selector_options_2']['selected_column_selector_option2']
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
74 if column_option in ['by_index_number', 'all_but_by_index_number', 'by_header_name', 'all_but_by_header_name']:
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
75 c = params['input_options']['column_selector_options_2']['col2']
3
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
76 else:
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
77 c = None
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
78 y = read_columns(
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
79 '$input_options.infile2',
3
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
80 c = c,
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
81 c_option = column_option,
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
82 sep='\t',
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
83 header=header,
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
84 parse_dates=True)
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
85 y = y.ravel()
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
86
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
87 ## handle options
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
88 options = params['model_validation_functions']['options']
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
89 splitter, groups = get_cv( options.pop('cv_selector') )
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
90 options['cv'] = splitter
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
91 options['groups'] = groups
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
92 options['n_jobs'] = N_JOBS
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
93 if 'scoring' in options:
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
94 primary_scoring = options['scoring']['primary_scoring']
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
95 options['scoring'] = get_scoring(options['scoring'])
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
96 if 'pre_dispatch' in options and options['pre_dispatch'] == '':
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
97 options['pre_dispatch'] = None
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
98
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
99 ## load pipeline
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
100 with open('$infile_pipeline', 'rb') as pipeline_handler:
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
101 pipeline = load_model(pipeline_handler)
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
102
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
103 ## Set up validator, run pipeline through validator and return results.
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
104
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
105 validator = params['model_validation_functions']['selected_function']
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
106 validator = getattr(model_selection, validator)
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
107
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
108 selected_function = params['model_validation_functions']['selected_function']
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
109
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
110 if selected_function == 'cross_validate':
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
111 res = validator(pipeline, X, y, **options)
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
112 rval = pd.DataFrame(res)
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
113 col_rename = {}
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
114 for col in rval.columns:
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
115 if col.endswith('_primary'):
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
116 col_rename[col] = col[:-7] + primary_scoring
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
117 rval.rename(inplace=True, columns=col_rename)
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
118 elif selected_function == 'cross_val_predict':
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
119 predicted = validator(pipeline, X, y, **options)
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
120 if len(predicted.shape) == 1:
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
121 rval = pd.DataFrame(predicted, columns=['Predicted'])
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
122 else:
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
123 rval = pd.DataFrame(predicted)
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
124 elif selected_function == 'learning_curve':
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
125 try:
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
126 train_sizes = safe_eval(options['train_sizes'])
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
127 except:
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
128 sys.exit("Unsupported train_sizes input! Supports int/float in tuple and array-like structure.")
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
129 if type(train_sizes) is tuple:
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
130 train_sizes = np.linspace(*train_sizes)
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
131 options['train_sizes'] = train_sizes
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
132 train_sizes_abs, train_scores, test_scores = validator(pipeline, X, y, **options)
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
133 rval = pd.DataFrame(dict(
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
134 train_sizes_abs = train_sizes_abs,
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
135 mean_train_scores = np.mean(train_scores, axis=1),
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
136 std_train_scores = np.std(train_scores, axis=1),
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
137 mean_test_scores = np.mean(test_scores, axis=1),
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
138 std_test_scores = np.std(test_scores, axis=1)))
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
139 rval = rval[['train_sizes_abs', 'mean_train_scores', 'std_train_scores',
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
140 'mean_test_scores', 'std_test_scores']]
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
141 elif selected_function == 'permutation_test_score':
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
142 score, permutation_scores, pvalue = validator(pipeline, X, y, **options)
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
143 permutation_scores_df = pd.DataFrame(dict(
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
144 permutation_scores = permutation_scores))
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
145 score_df = pd.DataFrame(dict(
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
146 score = [score],
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
147 pvalue = [pvalue]))
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
148 rval = pd.concat([score_df[['score', 'pvalue']], permutation_scores_df], axis=1)
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
149
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
150 rval.to_csv(path_or_buf='$outfile', sep='\t', header=True, index=False)
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
151
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
152 ]]>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
153 </configfile>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
154 </configfiles>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
155 <inputs>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
156 <param name="infile_pipeline" type="data" format="zip" label="Choose the dataset containing model/pipeline object"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
157 <conditional name="model_validation_functions">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
158 <param name="selected_function" type="select" label="Select a model validation function">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
159 <option value="cross_validate">cross_validate - Evaluate metric(s) by cross-validation and also record fit/score times</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
160 <option value="cross_val_predict">cross_val_predict - Generate cross-validated estimates for each input data point</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
161 <option value="learning_curve">learning_curve - Learning curve</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
162 <option value="permutation_test_score">permutation_test_score - Evaluate the significance of a cross-validated score with permutations</option>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
163 <option value="validation_curve">validation_curve - Use grid search with one parameter instead</option>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
164 </param>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
165 <when value="cross_validate">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
166 <section name="options" title="Other Options" expanded="false">
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
167 <expand macro="scoring_selection"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
168 <expand macro="model_validation_common_options"/>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
169 <!--param argument="return_train_score" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" help="Whether to include train scores."/> -->
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
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."/> -->
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
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."/> -->
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
172 <!--fit_params-->
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
173 <expand macro="pre_dispatch"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
174 </section>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
175 </when>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
176 <when value="cross_val_predict">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
177 <section name="options" title="Other Options" expanded="false">
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
178 <expand macro="model_validation_common_options" />
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
179 <!--fit_params-->
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
180 <expand macro="pre_dispatch" value="2*n_jobs’" help="Controls the number of jobs that get dispatched during parallel execution"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
181 <param argument="method" type="select" label="Invokes the passed method name of the passed estimator">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
182 <option value="predict" selected="true">predict</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
183 <option value="predict_proba">predict_proba</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
184 </param>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
185 </section>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
186 </when>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
187 <when value="learning_curve">
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
188 <section name="options" title="Other Options" expanded="false">
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
189 <expand macro="scoring_selection"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
190 <expand macro="model_validation_common_options"/>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
191 <param argument="train_sizes" type="text" value="(0.1, 1.0, 5)" label="train_sizes"
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
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.]">
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
193 <sanitizer>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
194 <valid initial="default">
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
195 <add value="["/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
196 <add value="]"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
197 </valid>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
198 </sanitizer>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
199 </param>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
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"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
201 <expand macro="pre_dispatch"/>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
202 <expand macro="shuffle" checked="false" label="shuffle" help="Whether to shuffle training data before taking prefixes"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
203 <expand macro="random_state" help_text="If int, the seed used by the random number generator. Used when `shuffle` is True"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
204 </section>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
205 </when>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
206 <when value="permutation_test_score">
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
207 <section name="options" title="Other Options" expanded="false">
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
208 <expand macro="scoring_selection"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
209 <expand macro="model_validation_common_options"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
210 <param name="n_permutations" type="integer" value="100" optional="true" label="n_permutations" help="Number of times to permute y"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
211 <expand macro="random_state"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
212 </section>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
213 </when>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
214 <when value="validation_curve"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
215 </conditional>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
216 <expand macro="sl_mixed_input"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
217 </inputs>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
218 <outputs>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
219 <data format="tabular" name="outfile"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
220 </outputs>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
221 <tests>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
222 <test>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
223 <param name="infile_pipeline" value="pipeline02"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
224 <param name="selected_function" value="cross_validate"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
225 <param name="infile1" value="regression_train.tabular" ftype="tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
226 <param name="col1" value="1,2,3,4,5"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
227 <param name="infile2" value="regression_train.tabular" ftype="tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
228 <param name="col2" value="6"/>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
229 <output name="outfile">
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
230 <assert_contents>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
231 <has_n_columns n="4"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
232 <has_text text="0.9999961390418067"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
233 <has_text text="0.9944541531269271"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
234 <has_text text="0.9999193322454393"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
235 </assert_contents>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
236 </output>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
237 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
238 <test>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
239 <param name="infile_pipeline" value="pipeline02"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
240 <param name="selected_function" value="cross_val_predict"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
241 <param name="infile1" value="regression_train.tabular" ftype="tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
242 <param name="col1" value="1,2,3,4,5"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
243 <param name="infile2" value="regression_train.tabular" ftype="tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
244 <param name="col2" value="6"/>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
245 <output name="outfile" file="mv_result02.tabular" lines_diff="4"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
246 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
247 <test>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
248 <param name="infile_pipeline" value="pipeline05"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
249 <param name="selected_function" value="learning_curve"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
250 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
251 <param name="header1" value="true" />
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
252 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
253 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
254 <param name="header2" value="true" />
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
255 <param name="col2" value="1"/>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
256 <output name="outfile" file="mv_result03.tabular"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
257 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
258 <test>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
259 <param name="infile_pipeline" value="pipeline05"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
260 <param name="selected_function" value="permutation_test_score"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
261 <param name="infile1" value="regression_train.tabular" ftype="tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
262 <param name="col1" value="1,2,3,4,5"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
263 <param name="infile2" value="regression_train.tabular" ftype="tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
264 <param name="col2" value="6"/>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
265 <output name="outfile">
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
266 <assert_contents>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
267 <has_n_columns n="3"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
268 <has_text text="0.25697059258228816"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
269 </assert_contents>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
270 </output>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
271 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
272 <test>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
273 <param name="infile_pipeline" value="pipeline05"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
274 <param name="selected_function" value="cross_val_predict"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
275 <section name="groups_selector">
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
276 <param name="infile_groups" value="regression_y.tabular" ftype="tabular"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
277 <param name="header_g" value="true"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
278 <param name="selected_column_selector_option_g" value="by_index_number"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
279 <param name="col_g" value="1"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
280 </section>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
281 <param name="selected_cv" value="GroupKFold"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
282 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
283 <param name="header1" value="true"/>
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
284 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
285 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
286 <param name="header2" value="true"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
287 <param name="col2" value="1"/>
17
cf9aa11b91c8 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ab963ec9498bd05d2fb2f24f75adb2fccae7958c
bgruening
parents: 16
diff changeset
288 <output name="outfile" file="mv_result05.tabular"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
289 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
290 </tests>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
291 <help>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
292 <![CDATA[
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
293 **What it does**
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
294 This tool includes model validation functions to evaluate estimator performance in the cross-validation approach. This tool is based on
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
295 sklearn.model_selection package.
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
296 For information about model validation functions and their parameter settings please refer to `Scikit-learn model_selection`_.
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
297
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
298 .. _`Scikit-learn model_selection`: http://scikit-learn.org/stable/modules/classes.html#module-sklearn.model_selection
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
299 ]]>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
300 </help>
13
badd86b9ce24 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cf3d813ec755166ee0bd517b4ecbbd4f84d4df1
bgruening
parents: 12
diff changeset
301 <expand macro="sklearn_citation">
badd86b9ce24 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cf3d813ec755166ee0bd517b4ecbbd4f84d4df1
bgruening
parents: 12
diff changeset
302 <expand macro="skrebate_citation"/>
badd86b9ce24 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cf3d813ec755166ee0bd517b4ecbbd4f84d4df1
bgruening
parents: 12
diff changeset
303 <expand macro="xgboost_citation"/>
badd86b9ce24 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cf3d813ec755166ee0bd517b4ecbbd4f84d4df1
bgruening
parents: 12
diff changeset
304 </expand>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
305 </tool>