Mercurial > repos > bgruening > sklearn_ensemble
diff ensemble.xml @ 4:3bc536788043 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
| author | bgruening |
|---|---|
| date | Fri, 16 Feb 2018 09:14:03 -0500 |
| parents | a92c5991d959 |
| children | 4c2fae2db5d1 |
line wrap: on
line diff
--- a/ensemble.xml Thu Jun 23 15:25:41 2016 -0400 +++ b/ensemble.xml Fri Feb 16 09:14:03 2018 -0500 @@ -50,7 +50,7 @@ #else: classifier_object = pickle.load(open("$selected_tasks.infile_model", 'r')) -data = pandas.read_csv("$selected_tasks.infile_data", sep='\t', header=None, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False ) +data = pandas.read_csv("$selected_tasks.infile_data", sep='\t', header=0, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False ) prediction = classifier_object.predict(data) prediction_df = pandas.DataFrame(prediction) res = pandas.concat([data, prediction_df], axis=1) @@ -131,14 +131,9 @@ </when> </expand> </inputs> - <outputs> - <data format="tabular" name="outfile_predict"> - <filter>selected_tasks['selected_task'] == 'load'</filter> - </data> - <data format="zip" name="outfile_fit"> - <filter>selected_tasks['selected_task'] == 'train'</filter> - </data> - </outputs> + + <expand macro="output"/> + <tests> <test> <param name="infile1" value="train.tabular" ftype="tabular"/> @@ -154,7 +149,7 @@ <param name="infile_model" value="rfc_model01" ftype="zip"/> <param name="infile_data" value="test.tabular" ftype="tabular"/> <param name="selected_task" value="load"/> - <output name="outfile_predict" file="rfc_result01"/> + <output name="outfile_predict" file="rfc_result01" compare="sim_size" delta="500"/> </test> <test> @@ -171,7 +166,7 @@ <param name="infile_model" value="rfr_model01" ftype="zip"/> <param name="infile_data" value="regression_test.tabular" ftype="tabular"/> <param name="selected_task" value="load"/> - <output name="outfile_predict" file="rfr_result01"/> + <output name="outfile_predict" file="rfr_result01" compare="sim_size" delta="500"/> </test> </tests> <help><![CDATA[ @@ -186,27 +181,27 @@ 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. 2 - Load a model and predict : An existing model predicts the class labels (or regression values) for a new dataset. - + **2 - Trainig input** 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: - + **Sample tabular features dataset** 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: - + :: - + 4.01163365529 -6.10797684314 8.29829894763 1 10.0788438916 1.59539821454 10.0684278289 0 -5.17607775503 -0.878286135332 6.92941850665 2 4.00975406235 -7.11847496542 9.3802423585 1 4.61204065139 -5.71217537352 9.12509610964 1 - + **Sample sparse features dataset** In this case you cannot specifiy a column range. - + :: - + 4 1048577 8738 1 271 0.02083333333333341 1 1038 0.02461995616119806 @@ -226,18 +221,18 @@ **3 - Prediction input** - + 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. - + .. class:: warningmark - + The number of feature columns must be the same in training and prediction datasets! - - + + **3 - Prediction output** 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. - + ]]></help> <expand macro="sklearn_citation"/> </tool>
