annotate feature_selection.xml @ 2:2eb90e73f0d5 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
author bgruening
date Tue, 22 May 2018 19:31:59 -0400
parents 092199a095dd
children 3a1acc39b39b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
1 <tool id="sklearn_feature_selection" name="Feature Selection" version="@VERSION@.1">
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
2 <description>module, including univariate filter selection methods and recursive feature elimination algorithm</description>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
3 <macros>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
4 <import>main_macros.xml</import>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
5 </macros>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
6 <expand macro="python_requirements"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
7 <expand macro="macro_stdio"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
8 <version_command>echo "@VERSION@"</version_command>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
9 <command>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
10 <![CDATA[
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
11 python "$feature_selection_script" '$inputs'
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
12 ]]>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
13 </command>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
14 <configfiles>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
15 <inputs name="inputs" />
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
16 <configfile name="feature_selection_script">
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
17 <![CDATA[
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
18 import sys
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
19 import json
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
20 import pandas
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
21 import pickle
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
22 import numpy as np
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
23 import sklearn.feature_selection
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
24 from sklearn import svm, linear_model, ensemble
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
25
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
26 @COLUMNS_FUNCTION@
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
27
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
28 input_json_path = sys.argv[1]
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
29 params = json.load(open(input_json_path, "r"))
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
30
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
31 ## Read features
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
32 features_has_header = params["input_options"]["header1"]
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
33 input_type = params["input_options"]["selected_input"]
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
34 if input_type=="tabular":
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
35 header = 'infer' if features_has_header else None
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
36 header = 'infer' if params["input_options"]["header1"] else None
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
37 X, input_df = read_columns(
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
38 "$input_options.infile1",
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
39 "$input_options.col1",
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
40 return_df = True,
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
41 sep='\t',
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
42 header=header,
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
43 parse_dates=True
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
44 )
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
45 else:
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
46 X = mmread(open("$input_options.infile1", 'r'))
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
47
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
48 ## Read labels
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
49 header = 'infer' if params["input_options"]["header2"] else None
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
50 y = read_columns(
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
51 "$input_options.infile2",
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
52 "$input_options.col2",
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
53 sep='\t',
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
54 header=header,
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
55 parse_dates=True
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
56 )
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
57 y=y.ravel()
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
58
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
59 ## Create feature selector
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
60 selector = params["feature_selection_algorithms"]["selected_algorithm"]
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
61 selector = getattr(sklearn.feature_selection, selector)
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
62 options = params["feature_selection_algorithms"]["options"]
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
63
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
64 if params['feature_selection_algorithms']['selected_algorithm'] == 'SelectFromModel':
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
65 if not options['threshold'] or options['threshold'] == 'None':
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
66 options['threshold'] = None
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
67 if 'extra_estimator' in params['feature_selection_algorithms'] and params['feature_selection_algorithms']['extra_estimator']['has_estimator'] == 'no_load':
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
68 fitted_estimator = pickle.load(open("params['feature_selection_algorithms']['extra_estimator']['fitted_estimator']", 'r'))
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
69 new_selector = selector(fitted_estimator, prefit=True, **options)
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
70 else:
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
71 estimator=params["feature_selection_algorithms"]["estimator"]
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
72 if params["feature_selection_algorithms"]["extra_estimator"]["has_estimator"]=='no':
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
73 estimator=params["feature_selection_algorithms"]["extra_estimator"]["new_estimator"]
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
74 estimator=eval(estimator.replace('__dq__', '"').replace("__sq__","'"))
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
75 new_selector = selector(estimator, **options)
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
76 new_selector.fit(X, y)
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
77
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
78 elif params['feature_selection_algorithms']['selected_algorithm'] in ['RFE', 'RFECV']:
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
79 if 'scoring' in options and (not options['scoring'] or options['scoring'] == 'None'):
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
80 options['scoring'] = None
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
81 estimator=params["feature_selection_algorithms"]["estimator"]
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
82 if params["feature_selection_algorithms"]["extra_estimator"]["has_estimator"]=='no':
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
83 estimator=params["feature_selection_algorithms"]["extra_estimator"]["new_estimator"]
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
84 estimator=eval(estimator.replace('__dq__', '"').replace("__sq__","'"))
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
85 new_selector = selector(estimator, **options)
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
86 new_selector.fit(X, y)
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
87
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
88 elif params['feature_selection_algorithms']['selected_algorithm'] == "VarianceThreshold":
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
89 new_selector = selector(**options)
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
90 new_selector.fit(X, y)
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
91
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
92 else:
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
93 score_func = params["feature_selection_algorithms"]["score_func"]
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
94 score_func = getattr(sklearn.feature_selection, score_func)
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
95 new_selector = selector(score_func, **options)
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
96 new_selector.fit(X, y)
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
97
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
98 ## Transform to select features
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
99 selected_names = None
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
100 if "$select_methods.selected_method" == "fit_transform":
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
101 res = new_selector.transform(X)
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
102 if features_has_header:
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
103 selected_names = input_df.columns[new_selector.get_support(indices=True)]
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
104 else:
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
105 res = new_selector.get_support(params["select_methods"]["indices"])
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
106
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
107 res = pandas.DataFrame(res, columns = selected_names)
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
108 res.to_csv(path_or_buf="$outfile", sep='\t', index=False)
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
109
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
110
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
111 ]]>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
112 </configfile>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
113 </configfiles>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
114 <inputs>
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
115 <expand macro="feature_selection_all" />
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
116 <expand macro="feature_selection_methods" />
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
117 <expand macro="sl_mixed_input"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
118 </inputs>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
119 <outputs>
2
2eb90e73f0d5 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 79fe42239dcf077b13f85cbcd6c6e30d7e1e4832
bgruening
parents: 0
diff changeset
120 <data format="tabular" name="outfile"/>
0
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
121 </outputs>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
122 <tests>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
123 <test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
124 <param name="selected_algorithm" value="SelectFromModel"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
125 <param name="has_estimator" value="no"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
126 <param name="new_estimator" value="ensemble.RandomForestRegressor(n_estimators = 1000, random_state = 42)"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
127 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
128 <param name="header1" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
129 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
130 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
131 <param name="col2" value="1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
132 <param name="header2" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
133 <output name="outfile" file="feature_selection_result01"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
134 </test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
135 <test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
136 <param name="selected_algorithm" value="GenericUnivariateSelect"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
137 <param name="param" value="20"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
138 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
139 <param name="header1" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
140 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
141 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
142 <param name="col2" value="1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
143 <param name="header2" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
144 <output name="outfile" file="feature_selection_result02"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
145 </test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
146 <test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
147 <param name="selected_algorithm" value="SelectPercentile"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
148 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
149 <param name="header1" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
150 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
151 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
152 <param name="col2" value="1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
153 <param name="header2" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
154 <output name="outfile" file="feature_selection_result03"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
155 </test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
156 <test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
157 <param name="selected_algorithm" value="SelectKBest"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
158 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
159 <param name="header1" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
160 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
161 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
162 <param name="col2" value="1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
163 <param name="header2" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
164 <output name="outfile" file="feature_selection_result04"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
165 </test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
166 <test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
167 <param name="selected_algorithm" value="SelectFpr"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
168 <param name="alpha" value="0.05"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
169 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
170 <param name="header1" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
171 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
172 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
173 <param name="col2" value="1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
174 <param name="header2" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
175 <output name="outfile" file="feature_selection_result05"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
176 </test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
177 <test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
178 <param name="selected_algorithm" value="SelectFdr"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
179 <param name="alpha" value="0.05"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
180 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
181 <param name="header1" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
182 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
183 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
184 <param name="col2" value="1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
185 <param name="header2" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
186 <output name="outfile" file="feature_selection_result06"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
187 </test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
188 <test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
189 <param name="selected_algorithm" value="SelectFwe"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
190 <param name="alpha" value="0.05"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
191 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
192 <param name="header1" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
193 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
194 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
195 <param name="col2" value="1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
196 <param name="header2" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
197 <output name="outfile" file="feature_selection_result07"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
198 </test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
199 <test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
200 <param name="selected_algorithm" value="RFE"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
201 <param name="has_estimator" value="no"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
202 <param name="new_estimator" value="ensemble.RandomForestRegressor(n_estimators = 1000, random_state = 42)"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
203 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
204 <param name="header1" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
205 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
206 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
207 <param name="col2" value="1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
208 <param name="header2" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
209 <output name="outfile" file="feature_selection_result08"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
210 </test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
211 <test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
212 <param name="selected_algorithm" value="RFECV"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
213 <param name="has_estimator" value="no"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
214 <param name="new_estimator" value="ensemble.RandomForestRegressor(n_estimators = 1000, random_state = 42)"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
215 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
216 <param name="header1" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
217 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
218 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
219 <param name="col2" value="1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
220 <param name="header2" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
221 <output name="outfile" file="feature_selection_result09"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
222 </test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
223 <test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
224 <param name="selected_algorithm" value="VarianceThreshold"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
225 <param name="threshold" value="0.1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
226 <param name="infile1" value="regression_X.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
227 <param name="header1" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
228 <param name="col1" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
229 <param name="infile2" value="regression_y.tabular" ftype="tabular"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
230 <param name="col2" value="1"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
231 <param name="header2" value="True"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
232 <output name="outfile" file="feature_selection_result10"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
233 </test>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
234 </tests>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
235 <help>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
236 <![CDATA[
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
237 **What it does**
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
238 This tool provides several loss, score, and utility functions to measure classification performance. Some metrics might require probability estimates of the positive class, confidence values, or binary decisions values. This tool is based on
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
239 sklearn.metrics package.
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
240 For information about classification metric functions and their parameter settings please refer to `Scikit-learn classification metrics`_.
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
241
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
242 .. _`Scikit-learn classification metrics`: http://scikit-learn.org/stable/modules/model_evaluation.html#classification-metrics
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
243 ]]>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
244 </help>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
245 <expand macro="sklearn_citation"/>
092199a095dd planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 7a31960686122d7e53054fef4996525f04ebd254
bgruening
parents:
diff changeset
246 </tool>