Mercurial > repos > bgruening > sklearn_ensemble
diff ensemble.xml @ 19:4570575d060c draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit d00173591e4a783a4c1cb2664e4bb192ab5414f7
author | bgruening |
---|---|
date | Fri, 17 Aug 2018 12:28:21 -0400 |
parents | f02eeabab5d1 |
children | 038cecaa9e7c |
line wrap: on
line diff
--- a/ensemble.xml Tue Aug 07 05:47:03 2018 -0400 +++ b/ensemble.xml Fri Aug 17 12:28:21 2018 -0400 @@ -15,6 +15,7 @@ <configfile name="ensemble_script"> <![CDATA[ import sys +import os import json import numpy as np import sklearn.ensemble @@ -22,8 +23,7 @@ import pickle from scipy.io import mmread -@COLUMNS_FUNCTION@ -@GET_X_y_FUNCTION@ +execfile("$__tool_directory__/utils.py") # Get inputs, outputs. input_json_path = sys.argv[1] @@ -47,6 +47,8 @@ if params["selected_tasks"]["selected_task"] == "train": algorithm = params["selected_tasks"]["selected_algorithms"]["selected_algorithm"] options = params["selected_tasks"]["selected_algorithms"]["options"] + if algorithm in ['RandomForestClassifier', 'RandomForestRegressor']: + options['n_jobs'] = N_JOBS if "select_max_features" in options: if options["select_max_features"]["max_features"] == "number_input": options["select_max_features"]["max_features"] = options["select_max_features"]["num_max_features"] @@ -107,7 +109,6 @@ <expand macro="max_leaf_nodes"/> <expand macro="bootstrap"/> <expand macro="warm_start" checked="false"/> - <expand macro="n_jobs"/> <expand macro="random_state"/> <expand macro="oob_score"/> <!--class_weight=None--> @@ -167,7 +168,6 @@ <expand macro="min_impurity_decrease"/> <expand macro="bootstrap"/> <expand macro="oob_score"/> - <expand macro="n_jobs"/> <expand macro="random_state"/> <expand macro="verbose"/> <expand macro="warm_start" checked="false"/>