Mercurial > repos > bgruening > sklearn_ensemble
annotate ensemble.xml @ 0:31fd07e0acdb draft
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
| author | bgruening |
|---|---|
| date | Tue, 31 May 2016 16:50:56 -0400 |
| parents | |
| children | a92c5991d959 |
| rev | line source |
|---|---|
|
0
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
1 <tool id="sklearn_ensemble" name="Ensemble methods" version="@VERSION@"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
2 <description>for classification and regression</description> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
3 <macros> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
4 <import>main_macros.xml</import> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
5 <!--macro name="priors"--> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
6 </macros> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
7 <expand macro="python_requirements"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
8 <expand macro="macro_stdio"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
9 <version_command>echo "@VERSION@"</version_command> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
10 <command><![CDATA[ |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
11 python "$ensemble_script" '$inputs' |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
12 ]]> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
13 </command> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
14 <configfiles> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
15 <inputs name="inputs"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
16 <configfile name="ensemble_script"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
17 <![CDATA[ |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
18 import sys |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
19 import json |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
20 import numpy as np |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
21 import sklearn.ensemble |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
22 import pandas |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
23 import pickle |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
24 from scipy.io import mmread |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
25 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
26 input_json_path = sys.argv[1] |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
27 params = json.load(open(input_json_path, "r")) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
28 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
29 #if $selected_tasks.selected_task == "train": |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
30 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
31 algorithm = params["selected_tasks"]["selected_algorithms"]["selected_algorithm"] |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
32 options = params["selected_tasks"]["selected_algorithms"]["options"] |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
33 input_type = params["selected_tasks"]["selected_algorithms"]["input_options"]["selected_input"] |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
34 if input_type=="tabular": |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
35 col1 = params["selected_tasks"]["selected_algorithms"]["input_options"]["col1"] |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
36 col1 = list(map(lambda x: x - 1, col1)) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
37 f1 = pandas.read_csv("$selected_tasks.selected_algorithms.input_options.infile1", sep='\t', header=None, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False ) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
38 X = f1.iloc[:,col1].values |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
39 else: |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
40 X = mmread(open("$selected_tasks.selected_algorithms.input_options.infile1", 'r')) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
41 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
42 col2 = params["selected_tasks"]["selected_algorithms"]["input_options"]["col2"] |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
43 col2 = list(map(lambda x: x - 1, col2)) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
44 f2 = pandas.read_csv("$selected_tasks.selected_algorithms.input_options.infile2", sep='\t', header=None, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False ) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
45 y = f2.iloc[:,col2].values |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
46 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
47 my_class = getattr(sklearn.ensemble, algorithm) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
48 estimator = my_class(**options) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
49 estimator.fit(X,y) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
50 pickle.dump(estimator,open("$outfile_fit", 'w+'), pickle.HIGHEST_PROTOCOL) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
51 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
52 #else: |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
53 classifier_object = pickle.load(open("$selected_tasks.infile_model", 'r')) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
54 data = pandas.read_csv("$selected_tasks.infile_data", sep='\t', header=None, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False ) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
55 prediction = classifier_object.predict(data) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
56 prediction_df = pandas.DataFrame(prediction) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
57 res = pandas.concat([data, prediction_df], axis=1) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
58 res.to_csv(path_or_buf = "$outfile_predict", sep="\t", index=False) |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
59 #end if |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
60 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
61 ]]> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
62 </configfile> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
63 </configfiles> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
64 <inputs> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
65 <expand macro="sl_Conditional" model="zip"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
66 <param name="selected_algorithm" type="select" label="Select an ensemble method:"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
67 <option value="RandomForestClassifier" selected="true">Random forest classifier</option> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
68 <option value="AdaBoostClassifier">Ada boost classifier</option> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
69 <option value="RandomForestRegressor">Random forest regressor</option> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
70 <option value="AdaBoostRegressor">Ada boost regressor</option> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
71 </param> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
72 <when value="RandomForestClassifier"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
73 <expand macro="sl_mixed_input"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
74 <section name="options" title="Advanced Options" expanded="False"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
75 <expand macro="n_estimators"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
76 <expand macro="criterion"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
77 <expand macro="max_features"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
78 <expand macro="max_depth"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
79 <expand macro="min_samples_split"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
80 <expand macro="min_samples_leaf"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
81 <expand macro="min_weight_fraction_leaf"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
82 <expand macro="max_leaf_nodes"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
83 <expand macro="bootstrap"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
84 <expand macro="warm_start" checked="false"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
85 <expand macro="random_state"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
86 <expand macro="oob_score"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
87 <!--class_weight=None--> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
88 </section> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
89 </when> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
90 <when value="AdaBoostClassifier"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
91 <expand macro="sl_mixed_input"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
92 <section name="options" title="Advanced Options" expanded="False"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
93 <!--base_estimator=None--> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
94 <expand macro="n_estimators" default_value="50"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
95 <expand macro="learning_rate"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
96 <param argument="algorithm" type="select" label="Boosting algorithm" help=" "> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
97 <option value="SAMME.R" selected="true">SAMME.R</option> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
98 <option value="SAMME">SAMME</option> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
99 </param> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
100 <expand macro="random_state"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
101 </section> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
102 </when> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
103 <when value="RandomForestRegressor"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
104 <expand macro="sl_mixed_input"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
105 <section name="options" title="Advanced Options" expanded="False"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
106 <expand macro="n_estimators"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
107 <expand macro="max_features"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
108 <expand macro="max_depth"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
109 <expand macro="min_samples_split"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
110 <expand macro="min_samples_leaf"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
111 <expand macro="min_weight_fraction_leaf"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
112 <expand macro="max_leaf_nodes"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
113 <expand macro="bootstrap"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
114 <expand macro="warm_start" checked="false"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
115 <expand macro="random_state"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
116 <expand macro="oob_score"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
117 </section> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
118 </when> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
119 <when value="AdaBoostRegressor"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
120 <expand macro="sl_mixed_input"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
121 <section name="options" title="Advanced Options" expanded="False"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
122 <!--base_estimator=None--> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
123 <expand macro="n_estimators" default_value="50"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
124 <expand macro="learning_rate"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
125 <param argument="loss" type="select" label="Loss function" optional="true" help="Used when updating the weights after each boosting iteration. "> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
126 <option value="linear" selected="true">linear</option> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
127 <option value="square">square</option> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
128 <option value="exponential">exponential</option> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
129 </param> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
130 <expand macro="random_state"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
131 </section> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
132 </when> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
133 </expand> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
134 </inputs> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
135 <outputs> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
136 <data format="tabular" name="outfile_predict"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
137 <filter>selected_tasks['selected_task'] == 'load'</filter> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
138 </data> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
139 <data format="zip" name="outfile_fit"> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
140 <filter>selected_tasks['selected_task'] == 'train'</filter> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
141 </data> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
142 </outputs> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
143 <tests> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
144 <test> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
145 <param name="infile1" value="train.tabular" ftype="tabular"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
146 <param name="infile2" value="train.tabular" ftype="tabular"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
147 <param name="col1" value="1,2,3,4"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
148 <param name="col2" value="5"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
149 <param name="selected_task" value="train"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
150 <param name="selected_algorithm" value="RandomForestClassifier"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
151 <param name="random_state" value="10"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
152 <output name="outfile_fit" file="rfc_model01" compare="sim_size" delta="500"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
153 </test> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
154 <test> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
155 <param name="infile_model" value="rfc_model01" ftype="zip"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
156 <param name="infile_data" value="test.tabular" ftype="tabular"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
157 <param name="selected_task" value="load"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
158 <output name="outfile_predict" file="rfc_result01"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
159 </test> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
160 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
161 <test> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
162 <param name="infile1" value="regression_train.tabular" ftype="tabular"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
163 <param name="infile2" value="regression_train.tabular" ftype="tabular"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
164 <param name="col1" value="1,2,3,4,5"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
165 <param name="col2" value="6"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
166 <param name="selected_task" value="train"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
167 <param name="selected_algorithm" value="RandomForestRegressor"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
168 <param name="random_state" value="10"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
169 <output name="outfile_fit" file="rfr_model01" compare="sim_size" delta="500"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
170 </test> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
171 <test> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
172 <param name="infile_model" value="rfr_model01" ftype="zip"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
173 <param name="infile_data" value="regression_test.tabular" ftype="tabular"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
174 <param name="selected_task" value="load"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
175 <output name="outfile_predict" file="rfr_result01"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
176 </test> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
177 </tests> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
178 <help><![CDATA[ |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
179 ***What it does*** |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
180 The goal of ensemble methods is to combine the predictions of several base estimators built with a given learning algorithm in order to improve generalizability / robustness over a single estimator. This tool offers two sets of ensemble algorithms for classification and regression: random forests and ADA boosting which are based on sklearn.ensemble library from Scikit-learn. Here you can find out about the input, output and methods presented in the tools. For information about ensemble methods and parameters settings please refer to `Scikit-learn ensemble`_. |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
181 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
182 .. _`Scikit-learn ensemble`: http://scikit-learn.org/stable/modules/ensemble.html |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
183 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
184 **1 - Methods** |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
185 There are two groups of operations available: |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
186 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
187 1 - Train a model : A training set containing samples and their respective labels (or predicted values) are input. Based on the selected algorithm and options, an estimator object is fit to the data and is returned. |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
188 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
189 2 - Load a model and predict : An existing model predicts the class labels (or regression values) for a new dataset. |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
190 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
191 **2 - Trainig input** |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
192 When you choose to train a model, you need a features dataset X and a labels set y. This tool expects tabular or sparse data for X and a single column for y (tabular). You can select a subset of columns in a tabular dataset as your features dataset or labels column. Below you find some examples: |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
193 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
194 **Sample tabular features dataset** |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
195 The following training dataset contains 3 feature columns and a column containing class labels. You can simply select the first 3 columns as features and the last column as labels: |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
196 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
197 :: |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
198 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
199 4.01163365529 -6.10797684314 8.29829894763 1 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
200 10.0788438916 1.59539821454 10.0684278289 0 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
201 -5.17607775503 -0.878286135332 6.92941850665 2 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
202 4.00975406235 -7.11847496542 9.3802423585 1 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
203 4.61204065139 -5.71217537352 9.12509610964 1 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
204 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
205 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
206 **Sample sparse features dataset** |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
207 In this case you cannot specifiy a column range. |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
208 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
209 :: |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
210 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
211 4 1048577 8738 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
212 1 271 0.02083333333333341 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
213 1 1038 0.02461995616119806 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
214 2 829017 0.01629088031127686 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
215 2 829437 0.01209127083516686 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
216 2 830752 0.02535100632816968 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
217 3 1047487 0.01485722929945572 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
218 3 1047980 0.02640566620767753 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
219 3 1048475 0.01665869913262564 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
220 4 608 0.01662975263094352 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
221 4 1651 0.02519674277562741 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
222 4 4053 0.04223659971350601 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
223 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
224 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
225 **2 - Trainig output** |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
226 The trained model is generated and output in the form of a binary file. |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
227 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
228 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
229 **3 - Prediction input** |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
230 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
231 When you choose to load a model and do prediction, the tool expects an already trained estimator and a tabular dataset as input. The dataset contains new samples which you want to classify or predict regression values for. |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
232 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
233 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
234 .. class:: warningmark |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
235 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
236 The number of feature columns must be the same in training and prediction datasets! |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
237 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
238 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
239 **3 - Prediction output** |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
240 The tool predicts the class labels for new samples and adds them as the last column to the prediction dataset. The new dataset then is output as a tabular file. The prediction output format should look like the training dataset. |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
241 |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
242 ]]></help> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
243 <expand macro="sklearn_citation"/> |
|
31fd07e0acdb
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 6c002ea2995c85f5f16adb2ef1c6be82dfbc5417
bgruening
parents:
diff
changeset
|
244 </tool> |
