Mercurial > repos > bgruening > sklearn_label_encoder
diff label_encoder.xml @ 0:03155260beb3 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit ea12f973df4b97a2691d9e4ce6bf6fae59d57717"
author | bgruening |
---|---|
date | Fri, 30 Apr 2021 23:36:38 +0000 |
parents | |
children | b008b609205e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/label_encoder.xml Fri Apr 30 23:36:38 2021 +0000 @@ -0,0 +1,65 @@ +<tool id="sklearn_label_encoder" name="Label encoder" version="@VERSION@"> + <description>Encode target labels with value between 0 and n_classes-1</description> + <macros> + <import>main_macros.xml</import> + </macros> + <expand macro="python_requirements"/> + <expand macro="macro_stdio"/> + <version_command>echo "@VERSION@"</version_command> + <command detect_errors="exit_code"><![CDATA[ + python '$__tool_directory__/label_encoder.py' + --inputs '$inputs' + --infile '$infile' + --outfile '$outfile' + ]]> + </command> + <configfiles> + <inputs name="inputs" /> + </configfiles> + <inputs> + <param name="infile" type="data" format="tabular" label="Input file"/> + <param name="header0" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Does the dataset contain header?"/> + </inputs> + <outputs> + <data name="outfile" format="tabular"/> + </outputs> + <tests> + <test> + <param name="infile" value="le_input_w_header.tabular" ftype="tabular"/> + <param name="header0" value="true"/> + <output name="outfile" file="le_output.tabular" ftype="tabular"/> + </test> + <test> + <param name="infile" value="le_input_wo_header.tabular" ftype="tabular"/> + <param name="header0" value="false"/> + <output name="outfile" file="le_output.tabular" ftype="tabular"/> + </test> + </tests> + <help><![CDATA[ +**What it does** + +class sklearn.preprocessing.LabelEncoder + +Encode target labels with value between 0 and n_classes-1. + +This transformer should be used to encode target values, i.e. y, and not the input X. + +Attributes: classes : ndarray of shape (n_classes,) +Hold the label for each class. +LabelEncoder can be used to normalize labels. + +It can also be used to transform non-numerical labels (as long as they are hashable and comparable) to numerical labels. + +Methods + +fit_transform(y) + +Fit label encoder and return encoded labels. + +Parameters: y: array-like of shape (n_samples,) + +Returns: y: array-like of shape (n_samples,) + + ]]></help> + <expand macro="sklearn_citation"/> +</tool>