annotate qiime2/qiime_sample-classifier_classify-samples.xml @ 14:a0a8d77a991c draft

Uploaded
author florianbegusch
date Thu, 03 Sep 2020 09:51:29 +0000
parents f190567fe3f6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
1 <?xml version="1.0" ?>
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
2 <tool id="qiime_sample-classifier_classify-samples" name="qiime sample-classifier classify-samples"
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
3 version="2020.8">
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
4 <description>Train and test a cross-validated supervised learning classifier.</description>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
5 <requirements>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
6 <requirement type="package" version="2020.8">qiime2</requirement>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
7 </requirements>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
8 <command><![CDATA[
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
9 qiime sample-classifier classify-samples
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
10
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
11 --i-table=$itable
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
12 # if $input_files_mmetadatafile:
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
13 # def list_dict_to_string(list_dict):
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
14 # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
15 # for d in list_dict[1:]:
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
16 # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
17 # end for
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
18 # return $file_list
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
19 # end def
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
20 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
21 # end if
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
22
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
23 #if '__ob__' in str($mmetadatacolumn):
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
24 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__ob__', '[')
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
25 #set $mmetadatacolumn = $mmetadatacolumn_temp
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
26 #end if
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
27 #if '__cb__' in str($mmetadatacolumn):
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
28 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__cb__', ']')
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
29 #set $mmetadatacolumn = $mmetadatacolumn_temp
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
30 #end if
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
31 #if 'X' in str($mmetadatacolumn):
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
32 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('X', '\\')
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
33 #set $mmetadatacolumn = $mmetadatacolumn_temp
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
34 #end if
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
35 #if '__sq__' in str($mmetadatacolumn):
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
36 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__sq__', "'")
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
37 #set $mmetadatacolumn = $mmetadatacolumn_temp
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
38 #end if
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
39 #if '__db__' in str($mmetadatacolumn):
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
40 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__db__', '"')
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
41 #set $mmetadatacolumn = $mmetadatacolumn_temp
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
42 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
43
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
44 --m-metadata-column=$mmetadatacolumn
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
45
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
46
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
47 --p-test-size=$ptestsize
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
48
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
49 --p-step=$pstep
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
50
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
51 --p-cv=$pcv
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
52
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
53 #if str($prandomstate):
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
54 --p-random-state=$prandomstate
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
55 #end if
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
56 --p-n-jobs=$pnjobs
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
57
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
58 --p-n-estimators=$pnestimators
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
59
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
60 #if str($pestimator) != 'None':
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
61 --p-estimator=$pestimator
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
62 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
63
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
64 #if $poptimizefeatureselection:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
65 --p-optimize-feature-selection
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
66 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
67
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
68 #if $pparametertuning:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
69 --p-parameter-tuning
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
70 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
71
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
72 #if str($ppalette) != 'None':
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
73 --p-palette=$ppalette
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
74 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
75
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
76 #if str($pmissingsamples) != 'None':
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
77 --p-missing-samples=$pmissingsamples
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
78 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
79
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
80 --o-sample-estimator=osampleestimator
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
81
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
82 --o-feature-importance=ofeatureimportance
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
83
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
84 --o-predictions=opredictions
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
85
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
86 --o-model-summary=omodelsummary
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
87
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
88 --o-accuracy-results=oaccuracyresults
5
a025a4a89e07 Uploaded
florianbegusch
parents: 0
diff changeset
89
9
f190567fe3f6 Uploaded
florianbegusch
parents: 5
diff changeset
90 --o-probabilities=oprobabilities
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
91
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
92 --o-heatmap=oheatmap
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
93
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
94 #if str($examples) != 'None':
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
95 --examples=$examples
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
96 #end if
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
97
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
98 ;
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
99 cp oprobabilities.qza $oprobabilities
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
100
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
101 ;
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
102 qiime tools export oheatmap.qzv --output-path out
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
103 && mkdir -p '$oheatmap.files_path'
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
104 && cp -r out/* '$oheatmap.files_path'
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
105 && mv '$oheatmap.files_path/index.html' '$oheatmap'
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
106
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
107 ]]></command>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
108 <inputs>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
109 <param format="qza,no_unzip.zip" label="--i-table: ARTIFACT FeatureTable[Frequency] Feature table containing all features that should be used for target prediction. [required]" name="itable" optional="False" type="data" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
110 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
111 <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA" name="additional_input" optional="True" type="data" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
112 </repeat>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
113 <param label="--m-metadata-column: COLUMN MetadataColumn[Categorical] Categorical metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
114 <param exclude_min="True" label="--p-test-size: PROPORTION Range(0.0, 1.0, inclusive_start=False) Fraction of input samples to exclude from training set and use for classifier testing. [default: 0.2]" max="1.0" min="0.0" name="ptestsize" optional="True" type="float" value="0.2" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
115 <param exclude_min="True" label="--p-step: PROPORTION Range(0.0, 1.0, inclusive_start=False) If optimize-feature-selection is True, step is the percentage of features to remove at each iteration. [default: 0.05]" max="1.0" min="0.0" name="pstep" optional="True" type="float" value="0.05" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
116 <param label="--p-cv: INTEGER Number of k-fold cross-validations to perform. Range(1, None) [default: 5]" min="1" name="pcv" optional="True" type="integer" value="5" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
117 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="False" type="text" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
118 <param label="--p-n-estimators: INTEGER Range(1, None) Number of trees to grow for estimation. More trees will improve predictive accuracy up to a threshold level, but will also increase time and memory requirements. This parameter only affects ensemble estimators, such as Random Forest, AdaBoost, ExtraTrees, and GradientBoosting. [default: 100]" min="1" name="pnestimators" optional="True" type="integer" value="100" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
119 <param label="--p-estimator: " name="pestimator" optional="True" type="select">
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
120 <option selected="True" value="None">Selection is Optional</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
121 <option value="RandomForestClassifier">RandomForestClassifier</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
122 <option value="ExtraTreesClassifier">ExtraTreesClassifier</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
123 <option value="GradientBoostingClassifier">GradientBoostingClassifier</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
124 <option value="AdaBoostClassifier">AdaBoostClassifier</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
125 <option value="KNeighborsClassifier">KNeighborsClassifier</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
126 <option value="LinearSVC">LinearSVC</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
127 <option value="SVC">SVC</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
128 </param>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
129 <param label="--p-optimize-feature-selection: --p-optimize-feature-selection: / --p-no-optimize-feature-selection Automatically optimize input feature selection using recursive feature elimination. [default: False]" name="poptimizefeatureselection" selected="False" type="boolean" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
130 <param label="--p-parameter-tuning: --p-parameter-tuning: / --p-no-parameter-tuning Automatically tune hyperparameters using random grid search. [default: False]" name="pparametertuning" selected="False" type="boolean" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
131 <param label="--p-palette: " name="ppalette" optional="True" type="select">
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
132 <option selected="True" value="None">Selection is Optional</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
133 <option value="YellowOrangeBrown">YellowOrangeBrown</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
134 <option value="YellowOrangeRed">YellowOrangeRed</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
135 <option value="OrangeRed">OrangeRed</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
136 <option value="PurpleRed">PurpleRed</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
137 <option value="RedPurple">RedPurple</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
138 <option value="BluePurple">BluePurple</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
139 <option value="GreenBlue">GreenBlue</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
140 <option value="PurpleBlue">PurpleBlue</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
141 <option value="YellowGreen">YellowGreen</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
142 <option value="summer">summer</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
143 <option value="copper">copper</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
144 <option value="viridis">viridis</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
145 <option value="cividis">cividis</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
146 <option value="plasma">plasma</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
147 <option value="inferno">inferno</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
148 <option value="magma">magma</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
149 <option value="sirocco">sirocco</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
150 <option value="drifting">drifting</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
151 <option value="melancholy">melancholy</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
152 <option value="enigma">enigma</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
153 <option value="eros">eros</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
154 <option value="spectre">spectre</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
155 <option value="ambition">ambition</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
156 <option value="mysteriousstains">mysteriousstains</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
157 <option value="daydream">daydream</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
158 <option value="solano">solano</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
159 <option value="navarro">navarro</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
160 <option value="dandelions">dandelions</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
161 <option value="deepblue">deepblue</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
162 <option value="verve">verve</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
163 <option value="greyscale">greyscale</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
164 </param>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
165 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
166 <option selected="True" value="None">Selection is Optional</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
167 <option value="error">error</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
168 <option value="ignore">ignore</option>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
169 </param>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
170 <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
171
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
172 </inputs>
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
173
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
174 <outputs>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
175 <data format="qza" label="${tool.name} on ${on_string}: sampleestimator.qza" name="osampleestimator" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
176 <data format="qza" label="${tool.name} on ${on_string}: featureimportance.qza" name="ofeatureimportance" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
177 <data format="qza" label="${tool.name} on ${on_string}: predictions.qza" name="opredictions" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
178 <data format="html" label="${tool.name} on ${on_string}: modelsummary.html" name="omodelsummary" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
179 <data format="html" label="${tool.name} on ${on_string}: accuracyresults.html" name="oaccuracyresults" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
180 <data format="qza" label="${tool.name} on ${on_string}: probabilities.qza" name="oprobabilities" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
181 <data format="html" label="${tool.name} on ${on_string}: heatmap.html" name="oheatmap" />
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
182
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
183 </outputs>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
184
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
185 <help><![CDATA[
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
186 Train and test a cross-validated supervised learning classifier.
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
187 ###############################################################
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
188
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
189 Predicts a categorical sample metadata column using a supervised learning
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
190 classifier. Splits input data into training and test sets. The training set
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
191 is used to train and test the estimator using a stratified k-fold cross-
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
192 validation scheme. This includes optional steps for automated feature
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
193 extraction and hyperparameter optimization. The test set validates
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
194 classification accuracy of the optimized estimator. Outputs classification
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
195 results for test set. For more details on the learning algorithm, see
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
196 http://scikit-learn.org/stable/supervised_learning.html
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
197
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
198 Parameters
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
199 ----------
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
200 table : FeatureTable[Frequency]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
201 Feature table containing all features that should be used for target
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
202 prediction.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
203 metadata : MetadataColumn[Categorical]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
204 Categorical metadata column to use as prediction target.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
205 test_size : Float % Range(0.0, 1.0, inclusive_start=False), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
206 Fraction of input samples to exclude from training set and use for
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
207 classifier testing.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
208 step : Float % Range(0.0, 1.0, inclusive_start=False), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
209 If optimize_feature_selection is True, step is the percentage of
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
210 features to remove at each iteration.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
211 cv : Int % Range(1, None), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
212 Number of k-fold cross-validations to perform.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
213 random_state : Int, optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
214 Seed used by random number generator.
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
215 n_jobs : Int, optional
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
216 Number of jobs to run in parallel.
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
217 n_estimators : Int % Range(1, None), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
218 Number of trees to grow for estimation. More trees will improve
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
219 predictive accuracy up to a threshold level, but will also increase
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
220 time and memory requirements. This parameter only affects ensemble
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
221 estimators, such as Random Forest, AdaBoost, ExtraTrees, and
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
222 GradientBoosting.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
223 estimator : Str % Choices('RandomForestClassifier', 'ExtraTreesClassifier', 'GradientBoostingClassifier', 'AdaBoostClassifier', 'KNeighborsClassifier', 'LinearSVC', 'SVC'), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
224 Estimator method to use for sample prediction.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
225 optimize_feature_selection : Bool, optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
226 Automatically optimize input feature selection using recursive feature
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
227 elimination.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
228 parameter_tuning : Bool, optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
229 Automatically tune hyperparameters using random grid search.
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
230 palette : Str % Choices('YellowOrangeBrown', 'YellowOrangeRed', 'OrangeRed', 'PurpleRed', 'RedPurple', 'BluePurple', 'GreenBlue', 'PurpleBlue', 'YellowGreen', 'summer', 'copper', 'viridis', 'cividis', 'plasma', 'inferno', 'magma', 'sirocco', 'drifting', 'melancholy', 'enigma', 'eros', 'spectre', 'ambition', 'mysteriousstains', 'daydream', 'solano', 'navarro', 'dandelions', 'deepblue', 'verve', 'greyscale'), optional
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
231 The color palette to use for plotting.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
232 missing_samples : Str % Choices('error', 'ignore'), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
233 How to handle missing samples in metadata. "error" will fail if missing
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
234 samples are detected. "ignore" will cause the feature table and
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
235 metadata to be filtered, so that only samples found in both files are
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
236 retained.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
237
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
238 Returns
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
239 -------
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
240 sample_estimator : SampleEstimator[Classifier]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
241 Trained sample estimator.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
242 feature_importance : FeatureData[Importance]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
243 Importance of each input feature to model accuracy.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
244 predictions : SampleData[ClassifierPredictions]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
245 Predicted target values for each input sample.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
246 model_summary : Visualization
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
247 Summarized parameter and (if enabled) feature selection information for
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
248 the trained estimator.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
249 accuracy_results : Visualization
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
250 Accuracy results visualization.
9
f190567fe3f6 Uploaded
florianbegusch
parents: 5
diff changeset
251 probabilities : SampleData[Probabilities]
f190567fe3f6 Uploaded
florianbegusch
parents: 5
diff changeset
252 Predicted class probabilities for each input sample.
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
253 heatmap : Visualization
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
254 A heatmap of the top 50 most important features from the table.
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
255 ]]></help>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
256 <macros>
0
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
257 <import>qiime_citation.xml</import>
14
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
258 </macros>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
259 <expand macro="qiime_citation"/>
a0a8d77a991c Uploaded
florianbegusch
parents: 9
diff changeset
260 </tool>