annotate model_validation.xml @ 16:86e1e2874460 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
author bgruening
date Sun, 30 Dec 2018 02:02:32 -0500
parents e244d6f2df1a
children cf9aa11b91c8
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[
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
18 import sys
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
19 import os
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
20 import json
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
21 import pandas
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
22 import numpy as np
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
23 from sklearn import preprocessing, model_selection, svm, linear_model, ensemble, naive_bayes, tree, neighbors
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
24 from sklearn.pipeline import Pipeline
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
25
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
26 exec(open('$__tool_directory__/utils.py').read(), globals())
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
27
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
28 warnings.filterwarnings('ignore')
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
29
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
30 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
31
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
32 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
33 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
34 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
35
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
36 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
37 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
38 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
39 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
40 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
41 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
42 else:
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
43 c = None
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
44 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
45 '$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
46 c = c,
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
47 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
48 sep='\t',
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
49 header=header,
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
50 parse_dates=True
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
51 )
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
52 else:
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
53 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
54
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
55 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
56 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
57 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
58 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
59 else:
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
60 c = None
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
61 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
62 '$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
63 c = c,
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
64 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
65 sep='\t',
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
66 header=header,
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
67 parse_dates=True
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
68 )
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
69 y=y.ravel()
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
70
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
71 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
72 splitter, groups = get_cv( options.pop('cv_selector') )
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
73 if groups is None:
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
74 options['cv'] = splitter
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
75 elif groups == '':
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
76 options['cv'] = list( splitter.split(X, y, groups=None) )
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
77 else:
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
78 options['cv'] = list( splitter.split(X, y, groups=groups) )
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
79 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
80 if 'scoring' in options:
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
81 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
82 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
83 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
84
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
85 pipeline_steps = []
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
86
8
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
87 ## Set up pre_processor and add to pipeline steps.
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
88 if params['pre_processing']['do_pre_processing'] == 'Yes':
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
89 preprocessor = params['pre_processing']['pre_processors']['selected_pre_processor']
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
90 pre_processor_options = params['pre_processing']['pre_processors']['options']
8
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
91 my_class = getattr(preprocessing, preprocessor)
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
92 pipeline_steps.append( ('pre_processor', my_class(**pre_processor_options)) )
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
93
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
94 ## Set up feature selector and add to pipeline steps.
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
95 if params['feature_selection']['do_feature_selection'] == 'Yes':
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
96 feature_selector = feature_selector(params['feature_selection']['fs_algorithm_selector'])
8
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
97 pipeline_steps.append( ('feature_selector', feature_selector) )
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
98
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
99 ## Set up estimator and add to pipeline.
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
100 estimator_json = params['model_validation_functions']['estimator_selector']
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
101 estimator = get_estimator(estimator_json)
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
102
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
103 pipeline_steps.append( ('estimator', estimator) )
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
104
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
105 pipeline = Pipeline(pipeline_steps)
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
106
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
107 ## 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
108
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
109 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
110 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
111
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
112 selected_function = params['model_validation_functions']['selected_function']
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
113 rval_type = params['model_validation_functions'].get('return_type', None)
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
114
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
115 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
116 res = validator(pipeline, X, y, **options)
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
117 rval = res[rval_type]
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
118 elif selected_function == 'learning_curve':
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
119 options['train_sizes'] = eval(options['train_sizes'])
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
120 train_sizes_abs, train_scores, test_scores = validator(pipeline, X, y, **options)
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
121 rval = eval(rval_type)
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
122 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
123 score, permutation_scores, pvalue = validator(pipeline, X, y, **options)
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
124 rval = eval(rval_type)
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
125 if rval_type in ['score', 'pvalue']:
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
126 rval = [rval]
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
127 elif selected_function == 'validation_curve':
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
128 options['param_name'] = 'estimator__' + options['param_name']
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
129 options['param_range'] = eval(options['param_range'])
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
130 train_scores, test_scores = validator(pipeline, X, y, **options)
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
131 rval = eval(rval_type)
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
132 else:
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
133 rval = validator(pipeline, X, y, **options)
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
134
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
135 rval = pandas.DataFrame(rval)
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
136 rval.to_csv(path_or_buf='$outfile', sep='\t', header=False, index=False)
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
137
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
138 ]]>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
139 </configfile>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
140 </configfiles>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
141 <inputs>
8
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
142 <conditional name="pre_processing">
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
143 <param name="do_pre_processing" type="select" label="Do pre_processing?">
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
144 <option value="No" selected="true"/>
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
145 <option value="Yes"/>
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
146 </param>
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
147 <when value="No"/>
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
148 <when value="Yes">
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
149 <conditional name="pre_processors">
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
150 <expand macro="sparse_preprocessors_ext" />
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
151 <expand macro="sparse_preprocessor_options_ext" />
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
152 </conditional>
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
153 </when>
fd7a054ffdbd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
bgruening
parents: 5
diff changeset
154 </conditional>
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
155 <conditional name="feature_selection">
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
156 <param name="do_feature_selection" type="select" label="Do feature selection?">
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
157 <option value="No" selected="true"/>
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
158 <option value="Yes"/>
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
159 </param>
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
160 <when value="No"/>
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
161 <when value="Yes">
16
86e1e2874460 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 57f4407e278a615f47a377a3328782b1d8e0b54d
bgruening
parents: 14
diff changeset
162 <expand macro="feature_selection_pipeline"/>
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
163 </when>
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
164 </conditional>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
165 <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
166 <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
167 <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
168 <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
169 <option value="cross_val_score">cross_val_score - Evaluate a score by cross-validation</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
170 <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
171 <option value="permutation_test_score">permutation_test_score - Evaluate the significance of a cross-validated score with permutations</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
172 <option value="validation_curve">validation_curve - Validation curve</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
173 </param>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
174 <when value="cross_validate">
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
175 <expand macro="estimator_selector_all" />
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
176 <section name="options" title="Other Options" expanded="false">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
177 <!--groups-->
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
178 <expand macro="model_validation_common_options"/>
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
179 <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
180 <!--fit_params-->
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
181 <expand macro="pre_dispatch"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
182 </section>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
183 <param name="return_type" type="select" label="Select a return type">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
184 <option value="test_score" selected="true">test_score</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
185 <option value="train_score">train_score</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
186 <option value="fit_time">fit_time</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
187 <option value="score_time">score_time</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
188 </param>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
189 </when>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
190 <when value="cross_val_predict">
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
191 <expand macro="estimator_selector_all" />
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
192 <section name="options" title="Other Options" expanded="false">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
193 <!--groups-->
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
194 <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
195 <!--fit_params-->
2
dd502cb0d567 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 4ed8c4f6ef9ece81797a398b17a99bbaf49a6978
bgruening
parents: 0
diff changeset
196 <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
197 <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
198 <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
199 <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
200 </param>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
201 </section>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
202 </when>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
203 <when value="cross_val_score">
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
204 <expand macro="estimator_selector_all" />
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
205 <section name="options" title="Other Options" expanded="false">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
206 <!--groups-->
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
207 <expand macro="model_validation_common_options"/>
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 <!--fit_params-->
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
210 <expand macro="pre_dispatch"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
211 </section>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
212 </when>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
213 <when value="learning_curve">
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
214 <expand macro="estimator_selector_all" />
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
215 <section name="options" title="Other Options" expanded="false">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
216 <!--groups-->
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
217 <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
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"/>
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
219 <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
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"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
221 <expand macro="pre_dispatch"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
222 <expand macro="shuffle" checked="false" label="shuffle" help="Whether to shuffle training data before taking prefixes"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
223 <expand macro="random_state"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
224 </section>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
225 <param name="return_type" type="select" label="Select a return type">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
226 <option value="train_sizes_abs" selected="true">train_sizes_abs</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
227 <option value="train_scores">train_scores</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
228 <option value="test_scores">test_scores</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
229 </param>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
230 </when>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
231 <when value="permutation_test_score">
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
232 <expand macro="estimator_selector_all" />
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
233 <section name="options" title="Other Options" expanded="false">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
234 <!--groups-->
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
235 <expand macro="model_validation_common_options"/>
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
236 <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
237 <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
238 <expand macro="random_state"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
239 </section>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
240 <param name="return_type" type="select" label="Select a return type">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
241 <option value="score" selected="true">score</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
242 <option value="permutation_scores">permutation_scores</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
243 <option value="pvalue">pvalue</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
244 </param>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
245 </when>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
246 <when value="validation_curve">
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
247 <expand macro="estimator_selector_all" />
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
248 <section name="options" title="Other Options" expanded="false">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
249 <param name="param_name" type="text" value="gamma" label="param_name" help="Name of the parameter that will be varied"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
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."/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
251 <!--groups-->
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
252 <expand macro="model_validation_common_options"/>
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
253 <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
254 <expand macro="pre_dispatch"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
255 </section>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
256 <param name="return_type" type="select" label="Select a return type">
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
257 <option value="train_scores" selected="true">train_scores</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
258 <option value="test_scores">test_scores</option>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
259 </param>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
260 </when>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
261 </conditional>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
262 <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
263 </inputs>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
264 <outputs>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
265 <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
266 </outputs>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
267 <tests>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
268 <test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
269 <param name="selected_function" value="cross_validate"/>
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
270 <param name="selected_module" value="linear_model"/>
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
271 <param name="selected_estimator" value="LassoCV"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
272 <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
273 <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
274 <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
275 <param name="col2" value="6"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
276 <output name="outfile" file="mv_result01.tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
277 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
278 <test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
279 <param name="selected_function" value="cross_val_predict"/>
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
280 <param name="selected_module" value="linear_model"/>
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
281 <param name="selected_estimator" value="LassoCV"/>
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_train.tabular" ftype="tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
283 <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
284 <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
285 <param name="col2" value="6"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
286 <output name="outfile" file="mv_result02.tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
287 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
288 <test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
289 <param name="selected_function" value="cross_val_score"/>
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
290 <param name="selected_module" value="linear_model"/>
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
291 <param name="selected_estimator" value="LassoCV"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
292 <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
293 <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
294 <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
295 <param name="col2" value="6"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
296 <output name="outfile" file="mv_result03.tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
297 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
298 <test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
299 <param name="selected_function" value="learning_curve"/>
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
300 <param name="selected_module" value="linear_model"/>
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
301 <param name="selected_estimator" value="LassoCV"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
302 <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
303 <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
304 <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
305 <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
306 <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
307 <param name="col2" value="1"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
308 <output name="outfile" file="mv_result04.tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
309 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
310 <test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
311 <param name="selected_function" value="permutation_test_score"/>
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
312 <param name="selected_module" value="linear_model"/>
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
313 <param name="selected_estimator" value="LassoCV"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
314 <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
315 <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
316 <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
317 <param name="col2" value="6"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
318 <output name="outfile" file="mv_result05.tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
319 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
320 <test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
321 <param name="selected_function" value="validation_curve"/>
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
322 <param name="selected_module" value="svm"/>
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
323 <param name="selected_estimator" value="SVC"/>
12
2c1851992069 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
bgruening
parents: 11
diff changeset
324 <param name="text_params" value="kernel='linear'"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
325 <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
326 <param name="header1" value="true" />
3
424d8d21744d planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
bgruening
parents: 2
diff changeset
327 <param name="selected_column_selector_option" value="all_columns"/>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
328 <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
329 <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
330 <param name="col2" value="1"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
331 <param name="return_type" value="test_scores"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
332 <output name="outfile" file="mv_result06.tabular"/>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
333 </test>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
334 </tests>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
335 <help>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
336 <![CDATA[
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
337 **What it does**
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
338 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
339 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
340 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
341
9
c6b3efcba7bd planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 76583c1fcd9d06a4679cc46ffaee44117b9e22cd
bgruening
parents: 8
diff changeset
342 .. _`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
343 ]]>
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
344 </help>
13
badd86b9ce24 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cf3d813ec755166ee0bd517b4ecbbd4f84d4df1
bgruening
parents: 12
diff changeset
345 <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
346 <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
347 <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
348 </expand>
0
333507faecab planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2e1e78576b38110cf5b1f2ed83b08b9c3a6cbfee
bgruening
parents:
diff changeset
349 </tool>