Mercurial > repos > bgruening > sklearn_nn_classifier
annotate nn_classifier.xml @ 26:444a6e95dcc6 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 80417bf0158a9b596e485dd66408f738f405145a
author | bgruening |
---|---|
date | Mon, 02 Oct 2023 08:24:41 +0000 |
parents | 11f52f966186 |
children |
rev | line source |
---|---|
25
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
1 <tool id="sklearn_nn_classifier" name="Nearest Neighbors Classification" version="@VERSION@" profile="@PROFILE@"> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
2 <description></description> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
3 <macros> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
4 <import>main_macros.xml</import> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
5 </macros> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
6 <expand macro="python_requirements" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
7 <expand macro="macro_stdio" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
8 <version_command>echo "@VERSION@"</version_command> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
9 <command><![CDATA[ |
1
9081adc10423
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2afd4f6be8b2870c2b3701189b28111bfa3ca0ad
bgruening
parents:
0
diff
changeset
|
10 python '$nnc_script' '$inputs' |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
11 ]]> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
12 </command> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
13 <configfiles> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
14 <inputs name="inputs" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
15 <configfile name="nnc_script"> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
16 <![CDATA[ |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
17 import sys |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
18 import json |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
19 import numpy as np |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
20 import sklearn.neighbors |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
21 import pandas |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
22 |
25
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
23 from galaxy_ml.model_persist import dump_model_to_h5, load_model_from_h5 |
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
24 from galaxy_ml.utils import clean_params, get_X_y |
11
a4afff311e0f
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 60f0fbc0eafd7c11bc60fb6c77f2937782efd8a9-dirty
bgruening
parents:
9
diff
changeset
|
25 |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
26 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
27 input_json_path = sys.argv[1] |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
28 with open(input_json_path, "r") as param_handler: |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
29 params = json.load(param_handler) |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
30 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
31 #if $selected_tasks.selected_task == "load": |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
32 |
25
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
33 classifier_object = load_model_from_h5('$infile_model') |
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
34 classifier_object = clean_params(classifier_object) |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
35 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
36 header = 'infer' if params["selected_tasks"]["header"] else None |
16
6cbf023ea0b9
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 5b2ac730ec6d3b762faa9034eddd19ad1b347476"
bgruening
parents:
11
diff
changeset
|
37 data = pandas.read_csv("$selected_tasks.infile_data", sep='\t', header=header, index_col=None, parse_dates=True, encoding=None) |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
38 prediction = classifier_object.predict(data) |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
39 prediction_df = pandas.DataFrame(prediction) |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
40 res = pandas.concat([data, prediction_df], axis=1) |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
41 res.to_csv(path_or_buf = "$outfile_predict", sep="\t", index=False) |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
42 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
43 #else: |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
44 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
45 X, y = get_X_y(params, "$selected_tasks.selected_algorithms.input_options.infile1" ,"$selected_tasks.selected_algorithms.input_options.infile2") |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
46 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
47 selected_algorithm = params["selected_tasks"]["selected_algorithms"]["selected_algorithm"] |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
48 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
49 if selected_algorithm == "nneighbors": |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
50 classifier = params["selected_tasks"]["selected_algorithms"]["sampling_methods"]["sampling_method"] |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
51 sys.stdout.write(classifier) |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
52 options = params["selected_tasks"]["selected_algorithms"]["sampling_methods"]["options"] |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
53 sys.stdout.write(str(options)) |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
54 elif selected_algorithm == "ncentroid": |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
55 options = params["selected_tasks"]["selected_algorithms"]["options"] |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
56 classifier = "NearestCentroid" |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
57 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
58 my_class = getattr(sklearn.neighbors, classifier) |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
59 classifier_object = my_class(**options) |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
60 classifier_object.fit(X, y) |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
61 |
25
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
62 dump_model_to_h5(classifier_object, '$outfile_fit') |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
63 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
64 #end if |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
65 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
66 ]]> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
67 </configfile> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
68 </configfiles> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
69 <inputs> |
25
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
70 <expand macro="sl_Conditional" model="h5mlm"> <!--Todo: add sparse to targets--> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
71 <param name="selected_algorithm" type="select" label="Classifier type"> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
72 <option value="nneighbors">Nearest Neighbors</option> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
73 <option value="ncentroid">Nearest Centroid</option> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
74 </param> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
75 <when value="nneighbors"> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
76 <expand macro="sl_mixed_input" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
77 <conditional name="sampling_methods"> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
78 <param name="sampling_method" type="select" label="Neighbor selection method"> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
79 <option value="KNeighborsClassifier" selected="true">K-nearest neighbors</option> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
80 <option value="RadiusNeighborsClassifier">Radius-based</option> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
81 </param> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
82 <when value="KNeighborsClassifier"> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
83 <expand macro="nn_advanced_options"> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
84 <param argument="n_neighbors" type="integer" optional="true" value="5" label="Number of neighbors" help=" " /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
85 </expand> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
86 </when> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
87 <when value="RadiusNeighborsClassifier"> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
88 <expand macro="nn_advanced_options"> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
89 <param argument="radius" type="float" optional="true" value="1.0" label="Radius" help="Range of parameter space to use by default for :meth ''radius_neighbors'' queries." /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
90 </expand> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
91 </when> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
92 </conditional> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
93 </when> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
94 <when value="ncentroid"> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
95 <expand macro="sl_mixed_input" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
96 <section name="options" title="Advanced Options" expanded="False"> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
97 <param argument="metric" type="text" optional="true" value="euclidean" label="Metric" help="The metric to use when calculating distance between instances in a feature array." /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
98 <param argument="shrink_threshold" type="float" optional="true" value="" label="Shrink threshold" help="Floating point number for shrinking centroids to remove features." /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
99 </section> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
100 </when> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
101 </expand> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
102 </inputs> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
103 |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
104 <expand macro="output" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
105 |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
106 <tests> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
107 <test> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
108 <param name="infile1" value="train_set.tabular" ftype="tabular" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
109 <param name="infile2" value="train_set.tabular" ftype="tabular" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
110 <param name="header1" value="True" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
111 <param name="header2" value="True" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
112 <param name="col1" value="1,2,3,4" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
113 <param name="col2" value="5" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
114 <param name="selected_task" value="train" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
115 <param name="selected_algorithm" value="nneighbors" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
116 <param name="sampling_method" value="KNeighborsClassifier" /> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
117 <param name="algorithm" value="brute" /> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
118 <output name="outfile_fit" file="nn_model01" compare="sim_size" delta="5" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
119 </test> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
120 <test> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
121 <param name="infile1" value="train_set.tabular" ftype="tabular" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
122 <param name="infile2" value="train_set.tabular" ftype="tabular" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
123 <param name="header1" value="True" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
124 <param name="header2" value="True" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
125 <param name="col1" value="1,2,3,4" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
126 <param name="col2" value="5" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
127 <param name="selected_task" value="train" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
128 <param name="selected_algorithm" value="nneighbors" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
129 <param name="sampling_method" value="RadiusNeighborsClassifier" /> |
25
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
130 <param name="algorithm" value="brute" /> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
131 <output name="outfile_fit" file="nn_model02" compare="sim_size" delta="5" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
132 </test> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
133 <test> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
134 <param name="infile1" value="train_set.tabular" ftype="tabular" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
135 <param name="infile2" value="train_set.tabular" ftype="tabular" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
136 <param name="header1" value="True" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
137 <param name="header2" value="True" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
138 <param name="col1" value="1,2,3,4" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
139 <param name="col2" value="5" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
140 <param name="selected_task" value="train" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
141 <param name="selected_algorithm" value="ncentroid" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
142 <output name="outfile_fit" file="nn_model03" compare="sim_size" delta="5" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
143 </test> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
144 <test> |
25
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
145 <param name="infile_model" value="nn_model01" ftype="h5mlm" /> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
146 <param name="infile_data" value="test_set.tabular" ftype="tabular" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
147 <param name="header" value="True" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
148 <param name="selected_task" value="load" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
149 <output name="outfile_predict" file="nn_prediction_result01.tabular" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
150 </test> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
151 <test> |
25
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
152 <param name="infile_model" value="nn_model02" ftype="h5mlm" /> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
153 <param name="infile_data" value="test_set.tabular" ftype="tabular" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
154 <param name="header" value="True" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
155 <param name="selected_task" value="load" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
156 <output name="outfile_predict" file="nn_prediction_result02.tabular" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
157 </test> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
158 <test> |
25
11f52f966186
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
bgruening
parents:
19
diff
changeset
|
159 <param name="infile_model" value="nn_model03" ftype="h5mlm" /> |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
160 <param name="infile_data" value="test_set.tabular" ftype="tabular" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
161 <param name="header" value="True" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
162 <param name="selected_task" value="load" /> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
163 <output name="outfile_predict" file="nn_prediction_result03.tabular" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
164 </test> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
165 </tests> |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
166 <help><![CDATA[ |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
167 **What it does** |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
168 This module implements the k-nearest neighbors classification algorithms. |
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
169 For more information check http://scikit-learn.org/stable/modules/neighbors.html |
19
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
170 ]]> </help> |
a4e183b0b0a4
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
bgruening
parents:
16
diff
changeset
|
171 <expand macro="sklearn_citation" /> |
0
edf1078e21bb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
bgruening
parents:
diff
changeset
|
172 </tool> |