Mercurial > repos > bgruening > scipy_sparse
view main_macros.xml @ 18:22d52774f737 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit b1e5fa3170484d2cc3396f2abe99bb8cfcfa9c65
author | bgruening |
---|---|
date | Tue, 07 Aug 2018 05:48:53 -0400 |
parents | f6325ab415c4 |
children | c92a4d1252e1 |
line wrap: on
line source
<macros> <token name="@VERSION@">0.9</token> <token name="@COLUMNS_FUNCTION@"> def read_columns(f, c=None, c_option='by_index_number', return_df=False, **args): data = pandas.read_csv(f, **args) if c_option == 'by_index_number': cols = list(map(lambda x: x - 1, c)) data = data.iloc[:,cols] if c_option == 'all_but_by_index_number': cols = list(map(lambda x: x - 1, c)) data.drop(data.columns[cols], axis=1, inplace=True) if c_option == 'by_header_name': cols = [e.strip() for e in c.split(',')] data = data[cols] if c_option == 'all_but_by_header_name': cols = [e.strip() for e in c.split(',')] data.drop(cols, axis=1, inplace=True) y = data.values if return_df: return y, data else: return y return y </token> ## generate an instance for one of sklearn.feature_selection classes <token name="@FEATURE_SELECTOR_FUNCTION@"> def feature_selector(inputs): selector = inputs["selected_algorithm"] selector = getattr(sklearn.feature_selection, selector) options = inputs["options"] if inputs['selected_algorithm'] == 'SelectFromModel': if not options['threshold'] or options['threshold'] == 'None': options['threshold'] = None if inputs['model_inputter']['input_mode'] == 'prefitted': model_file = inputs['model_inputter']['fitted_estimator'] with open(model_file, 'rb') as model_handler: fitted_estimator = pickle.load(model_handler) new_selector = selector(fitted_estimator, prefit=True, **options) else: estimator_json = inputs['model_inputter']["estimator_selector"] estimator = get_estimator(estimator_json) new_selector = selector(estimator, **options) elif inputs['selected_algorithm'] in ['RFE', 'RFECV']: if 'scoring' in options and (not options['scoring'] or options['scoring'] == 'None'): options['scoring'] = None estimator=get_estimator(inputs["estimator_selector"]) new_selector = selector(estimator, **options) elif inputs['selected_algorithm'] == "VarianceThreshold": new_selector = selector(**options) else: score_func = inputs["score_func"] score_func = getattr(sklearn.feature_selection, score_func) new_selector = selector(score_func, **options) return new_selector </token> <token name="@GET_X_y_FUNCTION@"> def get_X_y(params, file1, file2): input_type = params["selected_tasks"]["selected_algorithms"]["input_options"]["selected_input"] if input_type=="tabular": header = 'infer' if params["selected_tasks"]["selected_algorithms"]["input_options"]["header1"] else None column_option = params["selected_tasks"]["selected_algorithms"]["input_options"]["column_selector_options_1"]["selected_column_selector_option"] if column_option in ["by_index_number", "all_but_by_index_number", "by_header_name", "all_but_by_header_name"]: c = params["selected_tasks"]["selected_algorithms"]["input_options"]["column_selector_options_1"]["col1"] else: c = None X = read_columns( file1, c = c, c_option = column_option, sep='\t', header=header, parse_dates=True ) else: X = mmread(file1) header = 'infer' if params["selected_tasks"]["selected_algorithms"]["input_options"]["header2"] else None column_option = params["selected_tasks"]["selected_algorithms"]["input_options"]["column_selector_options_2"]["selected_column_selector_option2"] if column_option in ["by_index_number", "all_but_by_index_number", "by_header_name", "all_but_by_header_name"]: c = params["selected_tasks"]["selected_algorithms"]["input_options"]["column_selector_options_2"]["col2"] else: c = None y = read_columns( file2, c = c, c_option = column_option, sep='\t', header=header, parse_dates=True ) y=y.ravel() return X, y </token> <token name="@SAFE_EVAL_FUNCTION@"> def safe_eval(literal): FROM_SCIPY_STATS = [ 'bernoulli', 'binom', 'boltzmann', 'dlaplace', 'geom', 'hypergeom', 'logser', 'nbinom', 'planck', 'poisson', 'randint', 'skellam', 'zipf' ] FROM_NUMPY_RANDOM = [ 'beta', 'binomial', 'bytes', 'chisquare', 'choice', 'dirichlet', 'division', 'exponential', 'f', 'gamma', 'geometric', 'gumbel', 'hypergeometric', 'laplace', 'logistic', 'lognormal', 'logseries', 'mtrand', 'multinomial', 'multivariate_normal', 'negative_binomial', 'noncentral_chisquare', 'noncentral_f', 'normal', 'pareto', 'permutation', 'poisson', 'power', 'rand', 'randint', 'randn', 'random', 'random_integers', 'random_sample', 'ranf', 'rayleigh', 'sample', 'seed', 'set_state', 'shuffle', 'standard_cauchy', 'standard_exponential', 'standard_gamma', 'standard_normal', 'standard_t', 'triangular', 'uniform', 'vonmises', 'wald', 'weibull', 'zipf' ] # File opening and other unneeded functions could be dropped UNWANTED = ['open', 'type', 'dir', 'id', 'str', 'repr'] # Allowed symbol table. Add more if needed. new_syms = { 'np_arange': getattr(np, 'arange'), 'ensemble_ExtraTreesClassifier': getattr(ensemble, 'ExtraTreesClassifier') } syms = make_symbol_table(use_numpy=False, **new_syms) for method in FROM_SCIPY_STATS: syms['scipy_stats_' + method] = getattr(scipy.stats, method) for func in FROM_NUMPY_RANDOM: syms['np_random_' + func] = getattr(np.random, func) for key in UNWANTED: syms.pop(key, None) aeval = Interpreter(symtable=syms, use_numpy=False, minimal=False, no_if=True, no_for=True, no_while=True, no_try=True, no_functiondef=True, no_ifexp=True, no_listcomp=False, no_augassign=False, no_assert=True, no_delete=True, no_raise=True, no_print=True) return aeval(literal) </token> <token name="@GET_SEARCH_PARAMS_FUNCTION@"> def get_search_params(params_builder): search_params = {} for p in params_builder['param_set']: search_p = p['search_param_selector']['search_p'] if search_p.strip() == '': continue param_type = p['search_param_selector']['selected_param_type'] lst = search_p.split(":") assert (len(lst) == 2), "Error, make sure there is one and only one colon in search parameter input." literal = lst[1].strip() ev = safe_eval(literal) if param_type == "final_estimator_p": search_params["estimator__" + lst[0].strip()] = ev else: search_params["preprocessing_" + param_type[5:6] + "__" + lst[0].strip()] = ev return search_params </token> <token name="@GET_ESTIMATOR_FUNCTION@"> def get_estimator(estimator_json): estimator_module = estimator_json['selected_module'] estimator_cls = estimator_json['selected_estimator'] if estimator_module == "xgboost": cls = getattr(xgboost, estimator_cls) else: module = getattr(sklearn, estimator_module) cls = getattr(module, estimator_cls) estimator = cls() estimator_params = estimator_json['text_params'].strip() if estimator_params != "": try: params = ast.literal_eval('{' + estimator_params + '}') except ValueError: sys.exit("Unsupported parameter input: `%s`" %estimator_params) estimator.set_params(**params) return estimator </token> <token name="@GET_CV_FUNCTION@"> def get_cv(literal): if literal == "": return None if re.match(r'^\d+$', literal): return int(literal) m = re.match(r'^(?P<method>\w+)\((?P<args>.*)\)$', literal) if m: my_class = getattr( model_selection, m.group('method') ) args = safe_eval( 'dict('+ m.group('args') + ')' ) return my_class( **args ) sys.exit("Unsupported CV input: %s" %literal) </token> <xml name="python_requirements"> <requirements> <requirement type="package" version="2.7">python</requirement> <requirement type="package" version="0.19.1">scikit-learn</requirement> <requirement type="package" version="0.22.0">pandas</requirement> <requirement type="package" version="0.72.1">xgboost</requirement> <yield /> </requirements> </xml> <xml name="macro_stdio"> <stdio> <exit_code range="1:" level="fatal" description="Error occurred. Please check Tool Standard Error"/> </stdio> </xml> <!--Generic interface--> <xml name="sl_Conditional" token_train="tabular" token_data="tabular" token_model="txt"> <conditional name="selected_tasks"> <param name="selected_task" type="select" label="Select a Classification Task"> <option value="train" selected="true">Train a model</option> <option value="load">Load a model and predict</option> </param> <when value="load"> <param name="infile_model" type="data" format="@MODEL@" label="Models" help="Select a model file."/> <param name="infile_data" type="data" format="@DATA@" label="Data (tabular)" help="Select the dataset you want to classify."/> <param name="header" type="boolean" optional="True" truevalue="booltrue" falsevalue="boolfalse" checked="False" label="Does the dataset contain header:" /> <conditional name="prediction_options"> <param name="prediction_option" type="select" label="Select the type of prediction"> <option value="predict">Predict class labels</option> <option value="advanced">Include advanced options</option> </param> <when value="predict"> </when> <when value="advanced"> </when> </conditional> </when> <when value="train"> <conditional name="selected_algorithms"> <yield /> </conditional> </when> </conditional> </xml> <xml name="advanced_section"> <section name="options" title="Advanced Options" expanded="False"> <yield /> </section> </xml> <!--Generalized Linear Models--> <xml name="loss" token_help=" " token_select="false"> <param argument="loss" type="select" label="Loss function" help="@HELP@"> <option value="squared_loss" selected="@SELECT@">squared loss</option> <option value="huber">huber</option> <option value="epsilon_insensitive">epsilon insensitive</option> <option value="squared_epsilon_insensitive">squared epsilon insensitive</option> <yield/> </param> </xml> <xml name="penalty" token_help=" "> <param argument="penalty" type="select" label="Penalty (regularization term)" help="@HELP@"> <option value="l2" selected="true">l2</option> <option value="l1">l1</option> <option value="elasticnet">elastic net</option> <option value="none">none</option> <yield/> </param> </xml> <xml name="l1_ratio" token_default_value="0.15" token_help=" "> <param argument="l1_ratio" type="float" value="@DEFAULT_VALUE@" label="Elastic Net mixing parameter" help="@HELP@"/> </xml> <xml name="epsilon" token_default_value="0.1" token_help="Used if loss is ‘huber’, ‘epsilon_insensitive’, or ‘squared_epsilon_insensitive’. "> <param argument="epsilon" type="float" value="@DEFAULT_VALUE@" label="Epsilon (epsilon-sensitive loss functions only)" help="@HELP@"/> </xml> <xml name="learning_rate_s" token_help=" " token_selected1="false" token_selected2="false"> <param argument="learning_rate" type="select" optional="true" label="Learning rate schedule" help="@HELP@"> <option value="optimal" selected="@SELECTED1@">optimal</option> <option value="constant">constant</option> <option value="invscaling" selected="@SELECTED2@">inverse scaling</option> <yield/> </param> </xml> <xml name="eta0" token_default_value="0.0" token_help="Used with ‘constant’ or ‘invscaling’ schedules. "> <param argument="eta0" type="float" value="@DEFAULT_VALUE@" label="Initial learning rate" help="@HELP@"/> </xml> <xml name="power_t" token_default_value="0.5" token_help=" "> <param argument="power_t" type="float" value="@DEFAULT_VALUE@" label="Exponent for inverse scaling learning rate" help="@HELP@"/> </xml> <xml name="normalize" token_checked="false" token_help=" "> <param argument="normalize" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="@CHECKED@" label="Normalize samples before training" help=" "/> </xml> <xml name="copy_X" token_checked="true" token_help=" "> <param argument="copy_X" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="@CHECKED@" label="Use a copy of samples" help="If false, samples would be overwritten. "/> </xml> <xml name="ridge_params"> <expand macro="normalize"/> <expand macro="alpha" default_value="1.0"/> <expand macro="fit_intercept"/> <expand macro="max_iter" default_value=""/> <expand macro="tol" default_value="0.001" help_text="Precision of the solution. "/> <!--class_weight--> <expand macro="copy_X"/> <param argument="solver" type="select" value="" label="Solver to use in the computational routines" help=" "> <option value="auto" selected="true">auto</option> <option value="svd">svd</option> <option value="cholesky">cholesky</option> <option value="lsqr">lsqr</option> <option value="sparse_cg">sparse_cg</option> <option value="sag">sag</option> </param> <expand macro="random_state"/> </xml> <!--Ensemble methods--> <xml name="n_estimators" token_default_value="10" token_help=" "> <param argument="n_estimators" type="integer" optional="true" value="@DEFAULT_VALUE@" label="Number of trees in the forest" help="@HELP@"/> </xml> <xml name="max_depth" token_default_value="" token_help=" "> <param argument="max_depth" type="integer" optional="true" value="@DEFAULT_VALUE@" label="Maximum depth of the tree" help="@HELP@"/> </xml> <xml name="min_samples_split" token_type="integer" token_default_value="2" token_help=" "> <param argument="min_samples_split" type="@TYPE@" optional="true" value="@DEFAULT_VALUE@" label="Minimum number of samples required to split an internal node" help="@HELP@"/> </xml> <xml name="min_samples_leaf" token_type="integer" token_default_value="1" token_label="Minimum number of samples in newly created leaves" token_help=" "> <param argument="min_samples_leaf" type="@TYPE@" optional="true" value="@DEFAULT_VALUE@" label="@LABEL@" help="@HELP@"/> </xml> <xml name="min_weight_fraction_leaf" token_default_value="0.0" token_help=" "> <param argument="min_weight_fraction_leaf" type="float" optional="true" value="@DEFAULT_VALUE@" label="Minimum weighted fraction of the input samples required to be at a leaf node" help="@HELP@"/> </xml> <xml name="max_leaf_nodes" token_default_value="" token_help=" "> <param argument="max_leaf_nodes" type="integer" optional="true" value="@DEFAULT_VALUE@" label="Maximum number of leaf nodes in best-first method" help="@HELP@"/> </xml> <xml name="min_impurity_decrease" token_default_value="0" token_help=" "> <param argument="min_impurity_decrease" type="float" value="@DEFAULT_VALUE@" optional="true" label="The threshold value of impurity for stopping node splitting" help="@HELP@"/> </xml> <xml name="bootstrap" token_checked="true" token_help=" "> <param argument="bootstrap" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolflase" checked="@CHECKED@" label="Use bootstrap samples for building trees." help="@HELP@"/> </xml> <xml name="criterion" token_help=" "> <param argument="criterion" type="select" label="Function to measure the quality of a split" help=" "> <option value="gini" selected="true">Gini impurity</option> <option value="entropy">Information gain</option> <yield/> </param> </xml> <xml name="criterion2" token_help=""> <param argument="criterion" type="select" label="Function to measure the quality of a split" > <option value="mse">mse - mean squared error</option> <option value="mae">mae - mean absolute error</option> <yield/> </param> </xml> <xml name="oob_score" token_checked="false" token_help=" "> <param argument="oob_score" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="@CHECKED@" label="Use out-of-bag samples to estimate the generalization error" help="@HELP@"/> </xml> <xml name="max_features"> <conditional name="select_max_features"> <param argument="max_features" type="select" label="max_features"> <option value="auto" selected="true">auto - max_features=n_features</option> <option value="sqrt">sqrt - max_features=sqrt(n_features)</option> <option value="log2">log2 - max_features=log2(n_features)</option> <option value="number_input">I want to type the number in or input None type</option> </param> <when value="auto"> </when> <when value="sqrt"> </when> <when value="log2"> </when> <when value="number_input"> <param name="num_max_features" type="float" value="" optional="true" label="Input max_features number:" help="If int, consider the number of features at each split; If float, then max_features is a percentage and int(max_features * n_features) features are considered at each split."/> </when> </conditional> </xml> <xml name="verbose" token_default_value="0" token_help="If 1 then it prints progress and performance once in a while. If greater than 1 then it prints progress and performance for every tree."> <param argument="verbose" type="integer" value="@DEFAULT_VALUE@" optional="true" label="Enable verbose output" help="@HELP@"/> </xml> <xml name="learning_rate" token_default_value="1.0" token_help=" "> <param argument="learning_rate" type="float" optional="true" value="@DEFAULT_VALUE@" label="Learning rate" help="@HELP@"/> </xml> <xml name="subsample" token_help=" "> <param argument="subsample" type="float" value="1.0" optional="true" label="The fraction of samples to be used for fitting the individual base learners" help="@HELP@"/> </xml> <xml name="presort"> <param argument="presort" type="select" label="Whether to presort the data to speed up the finding of best splits in fitting" > <option value="auto" selected="true">auto</option> <option value="true">true</option> <option value="false">false</option> </param> </xml> <!--Parameters--> <xml name="tol" token_default_value="0.0" token_help_text="Early stopping heuristics based on the relative center changes. Set to default (0.0) to disable this convergence detection."> <param argument="tol" type="float" optional="true" value="@DEFAULT_VALUE@" label="Tolerance" help="@HELP_TEXT@"/> </xml> <xml name="n_clusters" token_default_value="8"> <param argument="n_clusters" type="integer" optional="true" value="@DEFAULT_VALUE@" label="Number of clusters" help=" "/> </xml> <xml name="fit_intercept" token_checked="true"> <param argument="fit_intercept" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="@CHECKED@" label="Estimate the intercept" help="If false, the data is assumed to be already centered."/> </xml> <xml name="n_jobs" token_default_value="1" token_label="The number of jobs to run in parallel for both fit and predict"> <param argument="n_jobs" type="integer" value="@DEFAULT_VALUE@" optional="true" label="@LABEL@" help="If -1, then the number of jobs is set to the number of cores"/> </xml> <xml name="n_iter" token_default_value="5" token_help_text="The number of passes over the training data (aka epochs). "> <param argument="n_iter" type="integer" optional="true" value="@DEFAULT_VALUE@" label="Number of iterations" help="@HELP_TEXT@"/> </xml> <xml name="shuffle" token_checked="true" token_help_text=" " token_label="Shuffle data after each iteration"> <param argument="shuffle" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="@CHECKED@" label="@LABEL@" help="@HELP_TEXT@"/> </xml> <xml name="random_state" token_default_value="" token_help_text="Integer number. The seed of the pseudo random number generator to use when shuffling the data. A fixed seed allows reproducible results."> <param argument="random_state" type="integer" optional="true" value="@DEFAULT_VALUE@" label="Random seed number" help="@HELP_TEXT@"/> </xml> <xml name="warm_start" token_checked="true" token_help_text="When set to True, reuse the solution of the previous call to fit as initialization,otherwise, just erase the previous solution."> <param argument="warm_start" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="@CHECKED@" label="Perform warm start" help="@HELP_TEXT@"/> </xml> <xml name="C" token_default_value="1.0" token_help_text="Penalty parameter C of the error term."> <param argument="C" type="float" optional="true" value="@DEFAULT_VALUE@" label="Penalty parameter" help="@HELP_TEXT@"/> </xml> <!--xml name="class_weight" token_default_value="" token_help_text=""> <param argument="class_weight" type="" optional="true" value="@DEFAULT_VALUE@" label="" help="@HELP_TEXT@"/> </xml--> <xml name="alpha" token_default_value="0.0001" token_help_text="Constant that multiplies the regularization term if regularization is used. "> <param argument="alpha" type="float" optional="true" value="@DEFAULT_VALUE@" label="Regularization coefficient" help="@HELP_TEXT@"/> </xml> <xml name="n_samples" token_default_value="100" token_help_text="The total number of points equally divided among clusters."> <param argument="n_samples" type="integer" optional="true" value="@DEFAULT_VALUE@" label="Number of samples" help="@HELP_TEXT@"/> </xml> <xml name="n_features" token_default_value="2" token_help_text="Number of different numerical properties produced for each sample."> <param argument="n_features" type="integer" optional="true" value="@DEFAULT_VALUE@" label="Number of features" help="@HELP_TEXT@"/> </xml> <xml name="noise" token_default_value="0.0" token_help_text="Floating point number. "> <param argument="noise" type="float" optional="true" value="@DEFAULT_VALUE@" label="Standard deviation of the Gaussian noise added to the data" help="@HELP_TEXT@"/> </xml> <xml name="C" token_default_value="1.0" token_help_text="Penalty parameter C of the error term. "> <param argument="C" type="float" optional="true" value="@DEFAULT_VALUE@" label="Penalty parameter" help="@HELP_TEXT@"/> </xml> <xml name="max_iter" token_default_value="300" token_label="Maximum number of iterations per single run" token_help_text=" "> <param argument="max_iter" type="integer" optional="true" value="@DEFAULT_VALUE@" label="@LABEL@" help="@HELP_TEXT@"/> </xml> <xml name="n_init" token_default_value="10" > <param argument="n_init" type="integer" optional="true" value="@DEFAULT_VALUE@" label="Number of runs with different centroid seeds" help=" "/> </xml> <xml name="init"> <param argument="init" type="select" label="Centroid initialization method" help="''k-means++'' selects initial cluster centers that speed up convergence. ''random'' chooses k observations (rows) at random from data as initial centroids."> <option value="k-means++">k-means++</option> <option value="random">random</option> </param> </xml> <xml name="gamma" token_default_value="1.0" token_label="Scaling parameter" token_help_text=" "> <param argument="gamma" type="float" optional="true" value="@DEFAULT_VALUE@" label="@LABEL@" help="@HELP_TEXT@"/> </xml> <xml name="degree" token_default_value="3" token_label="Degree of the polynomial" token_help_text=" "> <param argument="degree" type="integer" optional="true" value="@DEFAULT_VALUE@" label="@LABEL@" help="@HELP_TEXT@"/> </xml> <xml name="coef0" token_default_value="1" token_label="Zero coefficient" token_help_text=" "> <param argument="coef0" type="integer" optional="true" value="@DEFAULT_VALUE@" label="@LABEL@" help="@HELP_TEXT@"/> </xml> <xml name="pos_label" token_default_value=""> <param argument="pos_label" type="integer" optional="true" value="@DEFAULT_VALUE@" label="Label of the positive class" help=" "/> </xml> <xml name="average"> <param argument="average" type="select" optional="true" label="Averaging type" help=" "> <option value="micro">Calculate metrics globally by counting the total true positives, false negatives and false positives. (micro)</option> <option value="samples">Calculate metrics for each instance, and find their average. Only meaningful for multilabel. (samples)</option> <option value="macro">Calculate metrics for each label, and find their unweighted mean. This does not take label imbalance into account. (macro)</option> <option value="weighted">Calculate metrics for each label, and find their average, weighted by support (the number of true instances for each label). This alters ‘macro’ to account for label imbalance; it can result in an F-score that is not between precision and recall. (weighted)</option> <option value="None">None</option> <yield/> </param> </xml> <xml name="beta"> <param argument="beta" type="float" value="1.0" label="The strength of recall versus precision in the F-score" help=" "/> </xml> <!--Data interface--> <xml name="samples_tabular" token_multiple1="false" token_multiple2="false"> <param name="infile1" type="data" format="tabular" label="Training samples dataset:"/> <param name="header1" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="False" label="Does the dataset contain header:" /> <conditional name="column_selector_options_1"> <expand macro="samples_column_selector_options" multiple="@MULTIPLE1@"/> </conditional> <param name="infile2" type="data" format="tabular" label="Dataset containing class labels:"/> <param name="header2" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="False" label="Does the dataset contain header:" /> <conditional name="column_selector_options_2"> <expand macro="samples_column_selector_options" column_option="selected_column_selector_option2" col_name="col2" multiple="@MULTIPLE2@" infile="infile2"/> </conditional> <yield/> </xml> <xml name="samples_column_selector_options" token_column_option="selected_column_selector_option" token_col_name="col1" token_multiple="False" token_infile="infile1"> <param name="@COLUMN_OPTION@" type="select" label="Choose how to select data by column:"> <option value="by_index_number" selected="true">Select columns by column index number(s)</option> <option value="by_header_name">Select columns by column header name(s)</option> <option value="all_but_by_index_number">All columns but by column index number(s)</option> <option value="all_but_by_header_name">All columns but by column header name(s)</option> <option value="all_columns">All columns</option> </param> <when value="by_index_number"> <param name="@COL_NAME@" multiple="@MULTIPLE@" type="data_column" data_ref="@INFILE@" label="Select target column(s):"/> </when> <when value="by_header_name"> <param name="@COL_NAME@" type="text" value="" label="Type header name(s):" help="Comma-separated string. For example: target1,target2"/> </when> <when value="all_but_by_index_number"> <param name="@COL_NAME@" multiple="@MULTIPLE@" type="data_column" data_ref="@INFILE@" label="Select target column(s):"/> </when> <when value="all_but_by_header_name"> <param name="@COL_NAME@" type="text" value="" label="Type header name(s):" help="Comma-separated string. For example: target1,target2"/> </when> <when value="all_columns"> </when> </xml> <xml name="clf_inputs_extended" token_label1=" " token_label2=" " token_multiple="False"> <conditional name="true_columns"> <param name="selected_input1" type="select" label="Select the input type of true labels dataset:"> <option value="tabular" selected="true">Tabular</option> <option value="sparse">Sparse</option> </param> <when value="tabular"> <param name="infile1" type="data" label="@LABEL1@"/> <param name="col1" type="data_column" data_ref="infile1" label="Select the target column:"/> </when> <when value="sparse"> <param name="infile1" type="data" format="txt" label="@LABEL1@"/> </when> </conditional> <conditional name="predicted_columns"> <param name="selected_input2" type="select" label="Select the input type of predicted labels dataset:"> <option value="tabular" selected="true">Tabular</option> <option value="sparse">Sparse</option> </param> <when value="tabular"> <param name="infile2" type="data" label="@LABEL2@"/> <param name="col2" multiple="@MULTIPLE@" type="data_column" data_ref="infile2" label="Select target column(s):"/> </when> <when value="sparse"> <param name="infile2" type="data" format="txt" label="@LABEL1@"/> </when> </conditional> </xml> <xml name="clf_inputs" token_label1="Dataset containing true labels (tabular):" token_label2="Dataset containing predicted values (tabular):" token_multiple1="False" token_multiple="False"> <param name="infile1" type="data" format="tabular" label="@LABEL1@"/> <param name="header1" type="boolean" optional="True" truevalue="booltrue" falsevalue="boolfalse" checked="False" label="Does the dataset contain header:" /> <conditional name="column_selector_options_1"> <expand macro="samples_column_selector_options" multiple="@MULTIPLE1@"/> </conditional> <param name="infile2" type="data" format="tabular" label="@LABEL2@"/> <param name="header2" type="boolean" optional="True" truevalue="booltrue" falsevalue="boolfalse" checked="False" label="Does the dataset contain header:" /> <conditional name="column_selector_options_2"> <expand macro="samples_column_selector_options" column_option="selected_column_selector_option2" col_name="col2" multiple="@MULTIPLE@" infile="infile2"/> </conditional> </xml> <xml name="multiple_input" token_name="input_files" token_max_num="10" token_format="txt" token_label="Sparse matrix file (.mtx, .txt)" token_help_text="Specify a sparse matrix file in .txt format."> <repeat name="@NAME@" min="1" max="@MAX_NUM@" title="Select input file(s):"> <param name="input" type="data" format="@FORMAT@" label="@LABEL@" help="@HELP_TEXT@"/> </repeat> </xml> <xml name="sparse_target" token_label1="Select a sparse matrix:" token_label2="Select the tabular containing true labels:" token_multiple="False" token_format1="txt" token_format2="tabular" token_help1="" token_help2=""> <param name="infile1" type="data" format="@FORMAT1@" label="@LABEL1@" help="@HELP1@"/> <param name="infile2" type="data" format="@FORMAT2@" label="@LABEL2@" help="@HELP2@"/> <param name="col2" multiple="@MULTIPLE@" type="data_column" data_ref="infile2" label="Select target column(s):"/> </xml> <xml name="sl_mixed_input"> <conditional name="input_options"> <param name="selected_input" type="select" label="Select input type:"> <option value="tabular" selected="true">tabular data</option> <option value="sparse">sparse matrix</option> </param> <when value="tabular"> <expand macro="samples_tabular" multiple1="true"/> </when> <when value="sparse"> <expand macro="sparse_target"/> </when> </conditional> </xml> <!--Advanced options--> <xml name="nn_advanced_options"> <section name="options" title="Advanced Options" expanded="False"> <yield/> <param argument="weights" type="select" label="Weight function" help="Used in prediction."> <option value="uniform" selected="true">Uniform weights. All points in each neighborhood are weighted equally. (Uniform)</option> <option value="distance">Weight points by the inverse of their distance. (Distance)</option> </param> <param argument="algorithm" type="select" label="Neighbor selection algorithm" help=" "> <option value="auto" selected="true">Auto</option> <option value="ball_tree">BallTree</option> <option value="kd_tree">KDTree</option> <option value="brute">Brute-force</option> </param> <param argument="leaf_size" type="integer" value="30" label="Leaf size" help="Used with BallTree and KDTree. Affects the time and memory usage of the constructed tree."/> <!--param name="metric"--> <!--param name="p"--> <!--param name="metric_params"--> </section> </xml> <xml name="svc_advanced_options"> <section name="options" title="Advanced Options" expanded="False"> <yield/> <param argument="kernel" type="select" optional="true" label="Kernel type" help="Kernel type to be used in the algorithm. If none is given, ‘rbf’ will be used."> <option value="rbf" selected="true">rbf</option> <option value="linear">linear</option> <option value="poly">poly</option> <option value="sigmoid">sigmoid</option> <option value="precomputed">precomputed</option> </param> <param argument="degree" type="integer" optional="true" value="3" label="Degree of the polynomial (polynomial kernel only)" help="Ignored by other kernels. dafault : 3 "/> <!--TODO: param argument="gamma" float, optional (default=’auto’) --> <param argument="coef0" type="float" optional="true" value="0.0" label="Zero coefficient (polynomial and sigmoid kernels only)" help="Independent term in kernel function. dafault: 0.0 "/> <param argument="shrinking" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Use the shrinking heuristic" help=" "/> <param argument="probability" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Enable probability estimates. " help="This must be enabled prior to calling fit, and will slow down that method."/> <!-- param argument="cache_size"--> <!--expand macro="class_weight"/--> <expand macro="tol" default_value="0.001" help_text="Tolerance for stopping criterion. "/> <expand macro="max_iter" default_value="-1" label="Solver maximum number of iterations" help_text="Hard limit on iterations within solver, or -1 for no limit."/> <!--param argument="decision_function_shape"--> <expand macro="random_state" help_text="Integer number. The seed of the pseudo random number generator to use when shuffling the data for probability estimation. A fixed seed allows reproducible results."/> </section> </xml> <xml name="spectral_clustering_advanced_options"> <section name="options" title="Advanced Options" expanded="False"> <expand macro="n_clusters"/> <param argument="eigen_solver" type="select" value="" label="Eigen solver" help="The eigenvalue decomposition strategy to use."> <option value="arpack" selected="true">arpack</option> <option value="lobpcg">lobpcg</option> <option value="amg">amg</option> <!--None--> </param> <expand macro="random_state"/> <expand macro="n_init"/> <param argument="gamma" type="float" optional="true" value="1.0" label="Kernel scaling factor" help="Scaling factor of RBF, polynomial, exponential chi^2 and sigmoid affinity kernel. Ignored for affinity=''nearest_neighbors''."/> <param argument="affinity" type="select" label="Affinity" help="Affinity kernel to use. "> <option value="rbf" selected="true">RBF</option> <option value="precomputed">precomputed</option> <option value="nearest_neighbors">Nearset neighbors</option> </param> <param argument="n_neighbors" type="integer" optional="true" value="10" label="Number of neighbors" help="Number of neighbors to use when constructing the affinity matrix using the nearest neighbors method. Ignored for affinity=''rbf''"/> <!--param argument="eigen_tol"--> <param argument="assign_labels" type="select" label="Assign labels" help="The strategy to use to assign labels in the embedding space."> <option value="kmeans" selected="true">kmeans</option> <option value="discretize">discretize</option> </param> <param argument="degree" type="integer" optional="true" value="3" label="Degree of the polynomial (polynomial kernel only)" help="Ignored by other kernels. dafault : 3 "/> <param argument="coef0" type="integer" optional="true" value="1" label="Zero coefficient (polynomial and sigmoid kernels only)" help="Ignored by other kernels. dafault : 1 "/> <!--param argument="kernel_params"--> </section> </xml> <xml name="minibatch_kmeans_advanced_options"> <section name="options" title="Advanced Options" expanded="False"> <expand macro="n_clusters"/> <expand macro="init"/> <expand macro="n_init" default_value="3"/> <expand macro="max_iter" default_value="100"/> <expand macro="tol" help_text="Early stopping heuristics based on normalized center change. To disable set to 0.0 ."/> <expand macro="random_state"/> <param argument="batch_size" type="integer" optional="true" value="100" label="Batch size" help="Size of the mini batches."/> <!--param argument="compute_labels"--> <param argument="max_no_improvement" type="integer" optional="true" value="10" label="Maximum number of improvement attempts" help=" Convergence detection based on inertia (the consecutive number of mini batches that doe not yield an improvement on the smoothed inertia). To disable, set max_no_improvement to None. "/> <param argument="init_size" type="integer" optional="true" value="" label="Number of random initialization samples" help="Number of samples to randomly sample for speeding up the initialization . ( default: 3 * batch_size )"/> <param argument="reassignment_ratio" type="float" optional="true" value="0.01" label="Re-assignment ratio" help="Controls the fraction of the maximum number of counts for a center to be reassigned. Higher values yield better clustering results."/> </section> </xml> <xml name="kmeans_advanced_options"> <section name="options" title="Advanced Options" expanded="False"> <expand macro="n_clusters"/> <expand macro="init"/> <expand macro="n_init"/> <expand macro="max_iter"/> <expand macro="tol" default_value="0.0001" help_text="Relative tolerance with regards to inertia to declare convergence."/> <!--param argument="precompute_distances"/--> <expand macro="random_state"/> <param argument="copy_x" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Use a copy of data for precomputing distances" help="Mofifying the original data introduces small numerical differences caused by subtracting and then adding the data mean."/> </section> </xml> <xml name="birch_advanced_options"> <section name="options" title="Advanced Options" expanded="False"> <param argument="threshold" type="float" optional="true" value="0.5" label="Subcluster radius threshold" help="The radius of the subcluster obtained by merging a new sample; the closest subcluster should be less than the threshold to avoid a new subcluster."/> <param argument="branching_factor" type="integer" optional="true" value="50" label="Maximum number of subclusters per branch" help="Maximum number of CF subclusters in each node."/> <expand macro="n_clusters" default_value="3"/> <!--param argument="compute_labels"/--> </section> </xml> <xml name="dbscan_advanced_options"> <section name="options" title="Advanced Options" expanded="False"> <param argument="eps" type="float" optional="true" value="0.5" label="Maximum neighborhood distance" help="The maximum distance between two samples for them to be considered as in the same neighborhood."/> <param argument="min_samples" type="integer" optional="true" value="5" label="Minimal core point density" help="The number of samples (or total weight) in a neighborhood for a point (including the point itself) to be considered as a core point."/> <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."/> <param argument="algorithm" type="select" label="Pointwise distance computation algorithm" help="The algorithm to be used by the NearestNeighbors module to compute pointwise distances and find nearest neighbors."> <option value="auto" selected="true">auto</option> <option value="ball_tree">ball_tree</option> <option value="kd_tree">kd_tree</option> <option value="brute">brute</option> </param> <param argument="leaf_size" type="integer" optional="true" value="30" label="Leaf size" help="Leaf size passed to BallTree or cKDTree. Memory and time efficieny factor in tree constrution and querying."/> </section> </xml> <xml name="clustering_algorithms_options"> <conditional name="algorithm_options"> <param name="selected_algorithm" type="select" label="Clustering Algorithm"> <option value="KMeans" selected="true">KMeans</option> <option value="SpectralClustering">Spectral Clustering</option> <option value="MiniBatchKMeans">Mini Batch KMeans</option> <option value="DBSCAN">DBSCAN</option> <option value="Birch">Birch</option> </param> <when value="KMeans"> <expand macro="kmeans_advanced_options"/> </when> <when value="DBSCAN"> <expand macro="dbscan_advanced_options"/> </when> <when value="Birch"> <expand macro="birch_advanced_options"/> </when> <when value="SpectralClustering"> <expand macro="spectral_clustering_advanced_options"/> </when> <when value="MiniBatchKMeans"> <expand macro="minibatch_kmeans_advanced_options"/> </when> </conditional> </xml> <xml name="distance_metrics"> <param argument="metric" type="select" label="Distance metric" help=" "> <option value="euclidean" selected="true">euclidean</option> <option value="cityblock">cityblock</option> <option value="cosine">cosine</option> <option value="l1">l1</option> <option value="l2">l2</option> <option value="manhattan">manhattan</option> <yield/> </param> </xml> <xml name="distance_nonsparse_metrics"> <option value="braycurtis">braycurtis</option> <option value="canberra">canberra</option> <option value="chebyshev">chebyshev</option> <option value="correlation">correlation</option> <option value="dice">dice</option> <option value="hamming">hamming</option> <option value="jaccard">jaccard</option> <option value="kulsinski">kulsinski</option> <option value="mahalanobis">mahalanobis</option> <option value="matching">matching</option> <option value="minkowski">minkowski</option> <option value="rogerstanimoto">rogerstanimoto</option> <option value="russellrao">russellrao</option> <option value="seuclidean">seuclidean</option> <option value="sokalmichener">sokalmichener</option> <option value="sokalsneath">sokalsneath</option> <option value="sqeuclidean">sqeuclidean</option> <option value="yule">yule</option> </xml> <xml name="pairwise_kernel_metrics"> <param argument="metric" type="select" label="Pirwise Kernel metric" help=" "> <option value="rbf" selected="true">rbf</option> <option value="sigmoid">sigmoid</option> <option value="polynomial">polynomial</option> <option value="linear" selected="true">linear</option> <option value="chi2">chi2</option> <option value="additive_chi2">additive_chi2</option> </param> </xml> <xml name="sparse_pairwise_metric_functions"> <param name="selected_metric_function" type="select" label="Select the pairwise metric you want to compute:"> <option value="euclidean_distances" selected="true">Euclidean distance matrix</option> <option value="pairwise_distances">Distance matrix</option> <option value="pairwise_distances_argmin">Minimum distances between one point and a set of points</option> <yield/> </param> </xml> <xml name="pairwise_metric_functions"> <option value="additive_chi2_kernel" >Additive chi-squared kernel</option> <option value="chi2_kernel">Exponential chi-squared kernel</option> <option value="linear_kernel">Linear kernel</option> <option value="manhattan_distances">L1 distances</option> <option value="pairwise_kernels">Kernel</option> <option value="polynomial_kernel">Polynomial kernel</option> <option value="rbf_kernel">Gaussian (rbf) kernel</option> <option value="laplacian_kernel">Laplacian kernel</option> </xml> <xml name="sparse_pairwise_condition"> <when value="pairwise_distances"> <section name="options" title="Advanced Options" expanded="False"> <expand macro="distance_metrics"> <yield/> </expand> </section> </when> <when value="euclidean_distances"> <section name="options" title="Advanced Options" expanded="False"> <param argument="squared" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Return squared Euclidean distances" help=" "/> </section> </when> </xml> <xml name="argmin_distance_condition"> <when value="pairwise_distances_argmin"> <section name="options" title="Advanced Options" expanded="False"> <param argument="axis" type="integer" optional="true" value="1" label="Axis" help="Axis along which the argmin and distances are to be computed."/> <expand macro="distance_metrics"> <yield/> </expand> <param argument="batch_size" type="integer" optional="true" value="500" label="Batch size" help="Number of rows to be processed in each batch run."/> </section> </when> </xml> <xml name="sparse_preprocessors"> <param name="selected_pre_processor" type="select" label="Select a preprocessor:"> <option value="StandardScaler" selected="true">Standard Scaler (Standardizes features by removing the mean and scaling to unit variance)</option> <option value="Binarizer">Binarizer (Binarizes data)</option> <option value="Imputer">Imputer (Completes missing values)</option> <option value="MaxAbsScaler">Max Abs Scaler (Scales features by their maximum absolute value)</option> <option value="Normalizer">Normalizer (Normalizes samples individually to unit norm)</option> <yield/> </param> </xml> <xml name="sparse_preprocessors_ext"> <expand macro="sparse_preprocessors"> <option value="KernelCenterer">Kernel Centerer (Centers a kernel matrix)</option> <option value="MinMaxScaler">Minmax Scaler (Scales features to a range)</option> <option value="PolynomialFeatures">Polynomial Features (Generates polynomial and interaction features)</option> <option value="RobustScaler">Robust Scaler (Scales features using outlier-invariance statistics)</option> </expand> </xml> <xml name="sparse_preprocessor_options"> <when value="Binarizer"> <section name="options" title="Advanced Options" expanded="False"> <param argument="copy" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Use a copy of data for precomputing binarization" help=" "/> <param argument="threshold" type="float" optional="true" value="0.0" label="Threshold" help="Feature values below or equal to this are replaced by 0, above it by 1. Threshold may not be less than 0 for operations on sparse matrices. "/> </section> </when> <when value="Imputer"> <section name="options" title="Advanced Options" expanded="False"> <param argument="copy" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Use a copy of data for precomputing imputation" help=" "/> <param argument="strategy" type="select" optional="true" label="Imputation strategy" help=" "> <option value="mean" selected="true">Replace missing values using the mean along the axis</option> <option value="median">Replace missing values using the median along the axis</option> <option value="most_frequent">Replace missing using the most frequent value along the axis</option> </param> <param argument="missing_values" type="text" optional="true" value="NaN" label="Placeholder for missing values" help="For missing values encoded as numpy.nan, use the string value “NaN”"/> <param argument="axis" type="boolean" optional="true" truevalue="1" falsevalue="0" label="Impute along axis = 1" help="If fasle, axis = 0 is selected for imputation. "/> <!--param argument="axis" type="select" optional="true" label="The axis along which to impute" help=" "> <option value="0" selected="true">Impute along columns</option> <option value="1">Impute along rows</option> </param--> </section> </when> <when value="StandardScaler"> <section name="options" title="Advanced Options" expanded="False"> <param argument="copy" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Use a copy of data for performing inplace scaling" help=" "/> <param argument="with_mean" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Center the data before scaling" help=" "/> <param argument="with_std" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Scale the data to unit variance (or unit standard deviation)" help=" "/> </section> </when> <when value="MaxAbsScaler"> <section name="options" title="Advanced Options" expanded="False"> <param argument="copy" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Use a copy of data for precomputing scaling" help=" "/> </section> </when> <when value="Normalizer"> <section name="options" title="Advanced Options" expanded="False"> <param argument="norm" type="select" optional="true" label="The norm to use to normalize non zero samples" help=" "> <option value="l1" selected="true">l1</option> <option value="l2">l2</option> <option value="max">max</option> </param> <param argument="copy" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Use a copy of data for precomputing row normalization" help=" "/> </section> </when> <yield/> </xml> <xml name="sparse_preprocessor_options_ext"> <expand macro="sparse_preprocessor_options"> <when value="KernelCenterer"> <section name="options" title="Advanced Options" expanded="False"> </section> </when> <when value="MinMaxScaler"> <section name="options" title="Advanced Options" expanded="False"> <!--feature_range--> <param argument="copy" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolflase" checked="true" label="Use a copy of data for precomputing normalization" help=" "/> </section> </when> <when value="PolynomialFeatures"> <section name="options" title="Advanced Options" expanded="False"> <param argument="degree" type="integer" optional="true" value="2" label="The degree of the polynomial features " help=""/> <param argument="interaction_only" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolflase" checked="false" label="Produce interaction features only" help="(Features that are products of at most degree distinct input features) "/> <param argument="include_bias" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolflase" checked="true" label="Include a bias column" help="Feature in which all polynomial powers are zero "/> </section> </when> <when value="RobustScaler"> <section name="options" title="Advanced Options" expanded="False"> <!--=True, =True, copy=True--> <param argument="with_centering" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolflase" checked="true" label="Center the data before scaling" help=" "/> <param argument="with_scaling" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolflase" checked="true" label="Scale the data to interquartile range" help=" "/> <param argument="copy" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolflase" checked="true" label="Use a copy of data for inplace scaling" help=" "/> </section> </when> </expand> </xml> <xml name="fs_selectfrommodel_prefitted"> <param name="input_mode" type="select" label="Construct a new estimator from a selection list?" > <option value="new" selected="true">Yes</option> <option value="prefitted">No. Load a prefitted estimator</option> </param> <when value="new"> <expand macro="estimator_selector_all"/> </when> <when value="prefitted"> <param name="fitted_estimator" type="data" format='zip' label="Load a prefitted estimator" /> </when> </xml> <xml name="fs_selectfrommodel_no_prefitted"> <param name="input_mode" type="select" label="Construct a new estimator from a selection list?" > <option value="new" selected="true">Yes</option> </param> <when value="new"> <expand macro="estimator_selector_all"/> </when> </xml> <xml name="feature_selection_all"> <conditional name="fs_algorithm_selector"> <param name="selected_algorithm" type="select" label="Select a feature selection algorithm"> <option value="SelectKBest" selected="true">SelectKBest - Select features according to the k highest scores</option> <option value="SelectFromModel">SelectFromModel - Meta-transformer for selecting features based on importance weights</option> <option value="GenericUnivariateSelect">GenericUnivariateSelect - Univariate feature selector with configurable strategy</option> <option value="SelectPercentile">SelectPercentile - Select features according to a percentile of the highest scores</option> <option value="SelectFpr">SelectFpr - Filter: Select the p-values below alpha based on a FPR test</option> <option value="SelectFdr">SelectFdr - Filter: Select the p-values for an estimated false discovery rate</option> <option value="SelectFwe">SelectFwe - Filter: Select the p-values corresponding to Family-wise error rate</option> <option value="RFE">RFE - Feature ranking with recursive feature elimination</option> <option value="RFECV">RFECV - Feature ranking with recursive feature elimination and cross-validated selection of the best number of features</option> <option value="VarianceThreshold">VarianceThreshold - Feature selector that removes all low-variance features</option> </param> <when value="SelectFromModel"> <conditional name="model_inputter"> <yield/> </conditional> <section name="options" title="Advanced Options" expanded="False"> <param argument="threshold" type="text" value="" optional="true" label="threshold" help="The threshold value to use for feature selection. e.g. 'mean', 'median', '1.25*mean'." /> <param argument="norm_order" type="integer" value="1" label="norm_order" help="Order of the norm used to filter the vectors of coefficients below threshold in the case where the coef_ attribute of the estimator is of dimension 2. " /> </section> </when> <when value="GenericUnivariateSelect"> <expand macro="feature_selection_score_function" /> <section name="options" title="Advanced Options" expanded="False"> <param argument="mode" type="select" label="Feature selection mode"> <option value="percentile">percentile</option> <option value="k_best">k_best</option> <option value="fpr">fpr</option> <option value="fdr">fdr</option> <option value="fwe">fwe</option> </param> <param argument="param" type="float" value="" optional="true" label="Parameter of the corresponding mode" help="float or int depending on the feature selection mode" /> </section> </when> <when value="SelectPercentile"> <expand macro="feature_selection_score_function" /> <section name="options" title="Advanced Options" expanded="False"> <param argument="percentile" type="integer" value="10" optional="True" label="Percent of features to keep" /> </section> </when> <when value="SelectKBest"> <expand macro="feature_selection_score_function" /> <section name="options" title="Advanced Options" expanded="False"> <param argument="k" type="integer" value="10" optional="True" label="Number of top features to select" help="No 'all' option is supported." /> </section> </when> <when value="SelectFpr"> <expand macro="feature_selection_score_function" /> <section name="options" title="Advanced Options" expanded="False"> <param argument="alpha" type="float" value="" optional="True" label="Alpha" help="The highest p-value for features to be kept."/> </section> </when> <when value="SelectFdr"> <expand macro="feature_selection_score_function" /> <section name="options" title="Advanced Options" expanded="False"> <param argument="alpha" type="float" value="" optional="True" label="Alpha" help="The highest uncorrected p-value for features to keep."/> </section> </when> <when value="SelectFwe"> <expand macro="feature_selection_score_function" /> <section name="options" title="Advanced Options" expanded="False"> <param argument="alpha" type="float" value="" optional="True" label="Alpha" help="The highest uncorrected p-value for features to keep."/> </section> </when> <when value="RFE"> <expand macro="estimator_selector_all"/> <section name="options" title="Advanced Options" expanded="False"> <param argument="n_features_to_select" type="integer" value="" optional="true" label="n_features_to_select" help="The number of features to select. If None, half of the features are selected." /> <param argument="step" type="float" value="1" label="step" optional="true" help="Default = 1. " /> <param argument="verbose" type="integer" value="0" label="verbose" help="Controls verbosity of output." /> </section> </when> <when value="RFECV"> <expand macro="estimator_selector_all"/> <section name="options" title="Advanced Options" expanded="False"> <param argument="step" type="float" value="1" label="step" optional="true" help="Default = 1. " /> <param argument="cv" type="integer" value="" optional="true" label="cv" help="Determines the cross-validation splitting strategy" /> <param argument="scoring" type="text" value="" optional="true" label="scoring" help="A string (see model evaluation documentation) or a scorer callable object / function with signature scorer(estimator, X, y)."/> <param argument="verbose" type="integer" value="0" label="verbose" help="Controls verbosity of output." /> <param argument="n_jobs" type="integer" value="1" label="n_jobs" help="Number of cores to run in parallel while fitting across folds. Defaults to 1 core."/> </section> </when> <when value="VarianceThreshold"> <section name="options" title="Options" expanded="False"> <param argument="threshold" type="float" value="" optional="True" label="Threshold" help="Features with a training-set variance lower than this threshold will be removed."/> </section> </when> <!--when value="chi2"> </when> <when value="f_classif"> </when> <when value="f_regression"> </when> <when value="mutual_info_classif"> </when> <when value="mutual_info_regression"> </when--> </conditional> </xml> <xml name="feature_selection_score_function"> <param argument="score_func" type="select" label="Select a score function"> <option value="chi2">chi2 - Compute chi-squared stats between each non-negative feature and class</option> <option value="f_classif">f_classif - Compute the ANOVA F-value for the provided sample</option> <option value="f_regression">f_regression - Univariate linear regression tests</option> <option value="mutual_info_classif">mutual_info_classif - Estimate mutual information for a discrete target variable</option> <option value="mutual_info_regression">mutual_info_regression - Estimate mutual information for a continuous target variable</option> </param> </xml> <xml name="feature_selection_output_mothods"> <conditional name="output_method_selector"> <param name="selected_method" type="select" label="Select an output method:"> <option value="fit_transform">fit_transform - Fit to data, then transform it</option> <option value="get_support">get_support - Get a mask, or integer index, of the features selected</option> </param> <when value="fit_transform"> <!--**fit_params--> </when> <when value="get_support"> <param name="indices" type="boolean" optional="true" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Indices" help="If True, the return value will be an array of integers, rather than a boolean mask."/> </when> </conditional> </xml> <xml name="model_validation_common_options"> <param argument="cv" type="text" value="" size="50" optional="true" label="cv" help="Optional. Integer or evalable splitter object, e.g., StratifiedKFold(n_splits=3, shuffle=True, random_state=10). Leave blank for default." /> <expand macro="n_jobs"/> <expand macro="verbose"/> <yield/> </xml> <xml name="scoring"> <param argument="scoring" type="text" value="" optional="true" label="scoring" help="A metric used to evaluate the estimator"/> </xml> <xml name="pre_dispatch" token_type="hidden" token_default_value="all" token_help="Number of predispatched jobs for parallel execution"> <param argument="pre_dispatch" type="@TYPE@" value="@DEFAULT_VALUE@" optional="true" label="pre_dispatch" help="@HELP@"/> </xml> <xml name="search_cv_estimator"> <param name="infile_pipeline" type="data" format="zip" label="Choose the dataset containing pipeline object:"/> <section name="search_params_builder" title="Search parameters Builder" expanded="true"> <repeat name="param_set" min="1" max="20" title="Parameter setting for search:"> <conditional name="search_param_selector"> <param name="selected_param_type" type="select" label="Choose the transformation the parameter belongs to"> <option value="final_estimator_p" selected="true">Final estimator</option> <option value="prep_1_p">Pre-processing step #1</option> <option value="prep_2_p">Pre-processing step #2</option> <option value="prep_3_p">Pre-processing step #3</option> <option value="prep_4_p">Pre-processing step #4</option> <option value="prep_5_p">Pre-processing step #5</option> </param> <when value="final_estimator_p"> <expand macro="search_param_input" /> </when> <when value="prep_1_p"> <expand macro="search_param_input" label="Pre_processing component #1 parameter:" help="One parameter per box. For example: with_centering: [True, False]."/> </when> <when value="prep_2_p"> <expand macro="search_param_input" label="Pre_processing component #2 parameter:" help="One parameter per box. For example: k: [3, 5, 7, 9]. See bottom for more examples"/> </when> <when value="prep_3_p"> <expand macro="search_param_input" label="Pre_processing component #3 parameter:" help="One parameter per box. For example: n_components: [1, 10, 100, 1000]. See bottom for more examples"/> </when> <when value="prep_4_p"> <expand macro="search_param_input" label="Pre_processing component #4 parameter:" help="One parameter per box. For example: n_components: [1, 10, 100, 1000]. See bottom for more examples"/> </when> <when value="prep_5_p"> <expand macro="search_param_input" label="Pre_processing component #5 parameter:" help="One parameter per box. For example: affinity: ['euclidean', 'l1', 'l2', 'manhattan']. See bottom for more examples"/> </when> </conditional> </repeat> </section> </xml> <xml name="search_param_input" token_label="Estimator parameter:" token_help="One parameter per box. For example: C: [1, 10, 100, 1000]. See bottom for more examples"> <param name="search_p" type="text" value="" size="100" optional="true" label="@LABEL@" help="@HELP@"> <sanitizer> <valid initial="default"> <add value="'"/> <add value="""/> <add value="["/> <add value="]"/> </valid> </sanitizer> </param> </xml> <xml name="search_cv_options"> <expand macro="scoring"/> <expand macro="model_validation_common_options"/> <expand macro="pre_dispatch" value="2*n_jobs" help="Controls the number of jobs that get dispatched during parallel execution"/> <param argument="iid" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="iid" help="If True, data is identically distributed across the folds"/> <param argument="refit" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="refit" help="Refit an estimator using the best found parameters on the whole dataset."/> <!--error_score--> <param argument="return_train_score" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="return_train_score" help=""/> </xml> <xml name="estimator_selector_all"> <conditional name="estimator_selector"> <param name="selected_module" type="select" label="Choose the module that contains target estimator:" > <option value="svm" selected="true">sklearn.svm</option> <option value="linear_model">sklearn.linear_model</option> <option value="ensemble">sklearn.ensemble</option> <option value="naive_bayes">sklearn.naive_bayes</option> <option value="tree">sklearn.tree</option> <option value="neighbors">sklearn.neighbors</option> <option value="xgboost">xgboost</option> <!--more--> </param> <when value="svm"> <param name="selected_estimator" type="select" label="Choose estimator class:"> <option value="LinearSVC" selected="true">LinearSVC</option> <option value="LinearSVR">LinearSVR</option> <option value="NuSVC">NuSVC</option> <option value="NuSVR">NuSVR</option> <option value="OneClassSVM">OneClassSVM</option> <option value="SVC">SVC</option> <option value="SVR">SVR</option> </param> <expand macro="estimator_params_text"/> </when> <when value="linear_model"> <param name="selected_estimator" type="select" label="Choose estimator class:"> <option value="ARDRegression" selected="true">ARDRegression</option> <option value="BayesianRidge">BayesianRidge</option> <option value="ElasticNet">ElasticNet</option> <option value="ElasticNetCV">ElasticNetCV</option> <option value="HuberRegressor">HuberRegressor</option> <option value="Lars">Lars</option> <option value="LarsCV">LarsCV</option> <option value="Lasso">Lasso</option> <option value="LassoCV">LassoCV</option> <option value="LassoLars">LassoLars</option> <option value="LassoLarsCV">LassoLarsCV</option> <option value="LassoLarsIC">LassoLarsIC</option> <option value="LinearRegression">LinearRegression</option> <option value="LogisticRegression">LogisticRegression</option> <option value="LogisticRegressionCV">LogisticRegressionCV</option> <option value="MultiTaskLasso">MultiTaskLasso</option> <option value="MultiTaskElasticNet">MultiTaskElasticNet</option> <option value="MultiTaskLassoCV">MultiTaskLassoCV</option> <option value="MultiTaskElasticNetCV">MultiTaskElasticNetCV</option> <option value="OrthogonalMatchingPursuit">OrthogonalMatchingPursuit</option> <option value="OrthogonalMatchingPursuitCV">OrthogonalMatchingPursuitCV</option> <option value="PassiveAggressiveClassifier">PassiveAggressiveClassifier</option> <option value="PassiveAggressiveRegressor">PassiveAggressiveRegressor</option> <option value="Perceptron">Perceptron</option> <option value="RANSACRegressor">RANSACRegressor</option> <option value="Ridge">Ridge</option> <option value="RidgeClassifier">RidgeClassifier</option> <option value="RidgeClassifierCV">RidgeClassifierCV</option> <option value="RidgeCV">RidgeCV</option> <option value="SGDClassifier">SGDClassifier</option> <option value="SGDRegressor">SGDRegressor</option> <option value="TheilSenRegressor">TheilSenRegressor</option> </param> <expand macro="estimator_params_text"/> </when> <when value="ensemble"> <param name="selected_estimator" type="select" label="Choose estimator class:"> <option value="AdaBoostClassifier" selected="true">AdaBoostClassifier</option> <option value="AdaBoostRegressor">AdaBoostRegressor</option> <option value="BaggingClassifier">BaggingClassifier</option> <option value="BaggingRegressor">BaggingRegressor</option> <option value="ExtraTreesClassifier">ExtraTreesClassifier</option> <option value="ExtraTreesRegressor">ExtraTreesRegressor</option> <option value="GradientBoostingClassifier">GradientBoostingClassifier</option> <option value="GradientBoostingRegressor">GradientBoostingRegressor</option> <option value="IsolationForest">IsolationForest</option> <option value="RandomForestClassifier">RandomForestClassifier</option> <option value="RandomForestRegressor">RandomForestRegressor</option> <option value="RandomTreesEmbedding">RandomTreesEmbedding</option> <option value="VotingClassifier">VotingClassifier</option> </param> <expand macro="estimator_params_text"/> </when> <when value="naive_bayes"> <param name="selected_estimator" type="select" label="Choose estimator class:"> <option value="BernoulliNB" selected="true">BernoulliNB</option> <option value="GaussianNB">GaussianNB</option> <option value="MultinomialNB">MultinomialNB</option> </param> <expand macro="estimator_params_text"/> </when> <when value="tree"> <param name="selected_estimator" type="select" label="Choose estimator class:"> <option value="DecisionTreeClassifier" selected="true">DecisionTreeClassifier</option> <option value="DecisionTreeRegressor">DecisionTreeRegressor</option> <option value="ExtraTreeClassifier">ExtraTreeClassifier</option> <option value="ExtraTreeRegressor">ExtraTreeRegressor</option> </param> <expand macro="estimator_params_text"/> </when> <when value="neighbors"> <param name="selected_estimator" type="select" label="Choose estimator class:"> <option value="BallTree" selected="true">BallTree</option> <option value="DistanceMetric">DistanceMetric</option> <option value="KDTree">KDTree</option> <option value="KernelDensity">KernelDensity</option> <option value="KNeighborsClassifier">KNeighborsClassifier</option> <option value="KNeighborsRegressor">KNeighborsRegressor</option> <option value="LocalOutlierFactor">LocalOutlierFactor</option> <option value="RadiusNeighborsClassifier">RadiusNeighborsClassifier</option> <option value="RadiusNeighborsRegressor">RadiusNeighborsRegressor</option> <option value="NearestCentroid">NearestCentroid</option> <option value="NearestNeighbors">NearestNeighbors</option> </param> <expand macro="estimator_params_text"/> </when> <when value="xgboost"> <param name="selected_estimator" type="select" label="Choose estimator class:"> <option value="XGBRegressor" selected="true">XGBRegressor</option> <option value="XGBClassifier">XGBClassifier</option> </param> <expand macro="estimator_params_text"/> </when> </conditional> </xml> <xml name="estimator_params_text" token_label="Type in estimator parameters:" token_help="Parameters in dictionary without braces ('{}'), e.g., 'C': 1, 'kernel': 'linear'. No double quotes. Leave this box blank for default estimator."> <param name="text_params" type="text" value="" size="50" optional="true" label="@LABEL@" help="@HELP@"> <sanitizer> <valid initial="default"> <add value="'"/> </valid> </sanitizer> </param> </xml> <xml name="kernel_approximation_all"> <conditional name="kernel_approximation_selector"> <param name="select_algorithm" type="select" label="Choose a kernel approximation algorithm:"> <option value="Nystroem" selected="true">Nystroem</option> <option value="RBFSampler">RBFSampler</option> <option value="AdditiveChi2Sampler">AdditiveChi2Sampler</option> <option value="SkewedChi2Sampler">SkewedChi2Sampler</option> </param> <when value="Nystroem"> <expand macro="estimator_params_text" label="Type in kernel approximater parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'kernel': 'rbf'. No double quotes. Leave this box blank for class default."/> </when> <when value="RBFSampler"> <expand macro="estimator_params_text" label="Type in kernel approximater parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'gamma': 1.0. No double quotes. Leave this box blank for class default."/> </when> <when value="AdditiveChi2Sampler"> <expand macro="estimator_params_text" label="Type in kernel approximater parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'sample_steps': 2, 'sample_interval': None. No double quotes. Leave this box blank for class default."/> </when> <when value="SkewedChi2Sampler"> <expand macro="estimator_params_text" label="Type in kernel approximater parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'skewedness': 1.0. No double quotes. Leave this box blank for class default."/> </when> </conditional> </xml> <xml name="matrix_decomposition_all"> <conditional name="matrix_decomposition_selector"> <param name="select_algorithm" type="select" label="Choose a matrix decomposition algorithm:"> <option value="DictionaryLearning" selected="true">DictionaryLearning</option> <option value="FactorAnalysis">FactorAnalysis</option> <option value="FastICA">FastICA</option> <option value="IncrementalPCA">IncrementalPCA</option> <option value="KernelPCA">KernelPCA</option> <option value="LatentDirichletAllocation">LatentDirichletAllocation</option> <option value="MiniBatchDictionaryLearning">MiniBatchDictionaryLearning</option> <option value="MiniBatchSparsePCA">MiniBatchSparsePCA</option> <option value="NMF">NMF</option> <option value="PCA">PCA</option> <option value="SparsePCA">SparsePCA</option> <option value="SparseCoder">SparseCoder</option> <option value="TruncatedSVD">TruncatedSVD</option> </param> <when value="DictionaryLearning"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': None, 'alpha': 1.0. No double quotes. Leave this box blank for class default."/> </when> <when value="FactorAnalysis"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'random_state': 42. No double quotes. Leave this box blank for class default."/> </when> <when value="FastICA"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'random_state': 42. No double quotes. Leave this box blank for class default."/> </when> <when value="IncrementalPCA"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'whiten': False. No double quotes. Leave this box blank for class default."/> </when> <when value="KernelPCA"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'random_state': 42. No double quotes. Leave this box blank for class default."/> </when> <when value="LatentDirichletAllocation"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'random_state': 42. No double quotes. Leave this box blank for class default."/> </when> <when value="MiniBatchDictionaryLearning"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'random_state': 42. No double quotes. Leave this box blank for class default."/> </when> <when value="MiniBatchSparsePCA"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'random_state': 42. No double quotes. Leave this box blank for class default."/> </when> <when value="NMF"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'init': 'random'. No double quotes. Leave this box blank for class default."/> </when> <when value="PCA"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'random_state': 42. No double quotes. Leave this box blank for class default."/> </when> <when value="SparsePCA"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 100, 'random_state': 42. No double quotes. Leave this box blank for class default."/> </when> <when value="SparseCoder"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'transform_algorithm': 'omp', 'transform_alpha': 1.0. No double quotes. Leave this box blank for class default."/> </when> <when value="TruncatedSVD"> <expand macro="estimator_params_text" label="Type in maxtrix decomposition parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_components': 2, 'algorithm': 'randomized'. No double quotes. Leave this box blank for default estimator."/> </when> </conditional> </xml> <xml name="FeatureAgglomeration"> <conditional name="FeatureAgglomeration_selector"> <param name="select_algorithm" type="select" label="Choose the algorithm:"> <option value="FeatureAgglomeration" selected="true">FeatureAgglomeration</option> </param> <when value="FeatureAgglomeration"> <expand macro="estimator_params_text" label="Type in parameters:" help="Parameters in dictionary without braces ('{}'), e.g., 'n_clusters': 2, 'affinity': 'euclidean'. No double quotes. Leave this box blank for class default."/> </when> </conditional> </xml> <!-- Outputs --> <xml name="output"> <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> </xml> <!--Citations--> <xml name="eden_citation"> <citations> <citation type="doi">10.5281/zenodo.15094</citation> </citations> </xml> <xml name="sklearn_citation"> <citations> <citation type="bibtex"> @article{scikit-learn, title={Scikit-learn: Machine Learning in {P}ython}, author={Pedregosa, F. and Varoquaux, G. and Gramfort, A. and Michel, V. and Thirion, B. and Grisel, O. and Blondel, M. and Prettenhofer, P. and Weiss, R. and Dubourg, V. and Vanderplas, J. and Passos, A. and Cournapeau, D. and Brucher, M. and Perrot, M. and Duchesnay, E.}, journal={Journal of Machine Learning Research}, volume={12}, pages={2825--2830}, year={2011} url = {https://github.com/scikit-learn/scikit-learn} } </citation> </citations> </xml> <xml name="scipy_citation"> <citations> <citation type="bibtex"> @Misc{, author = {Eric Jones and Travis Oliphant and Pearu Peterson and others}, title = {{SciPy}: Open source scientific tools for {Python}}, year = {2001--}, url = "http://www.scipy.org/", note = {[Online; accessed 2016-04-09]} } </citation> </citations> </xml> </macros>