Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias TryExcept body Expr NameLoad handlers ExceptHandler type NameLoad body Assign NameStore TupleLoad NameLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign AttributeStore NameLoad attr ListLoad For NameStore NameLoad body AugAssignAdd AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If CompareGt NameLoad Call NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body ImportFrom alias Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore AttributeLoad NameLoad attr body If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad AttributeLoad NameLoad attr Str body Assign AttributeStore AttributeLoad NameLoad attr attr Num If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad Return NameLoad decorator_list NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Slice ListLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Delete SubscriptDel AttributeLoad NameLoad attr Slice decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad Str NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Assign NameStore Call AttributeLoad Str attr Call NameLoad BinOpMult Num Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return NameLoad Return Call NameLoad NameLoad decorator_list decorator_list
N/A N/A Tools for build ensembles on distributed compute resources

Author: Olivier Grisel <olivier@ogrisel.com>
Licensed: MIT
 N/A uuid N/A os random Random copy copy IPython.parallel interactive sklearn.base clone sklearn.externals joblib pyrallel.common TaskManager pyrallel.mmap_utils host_dump N/A N/A N/A basestring N/A N/A N/A NameError N/A N/A basestring N/A str bytes combine N/A N/A all_ensembles N/A N/A N/A Combine the sub-estimators of a group of ensembles

        >>> from sklearn.datasets import load_iris
        >>> from sklearn.ensemble import ExtraTreesClassifier
        >>> iris = load_iris()
        >>> X, y = iris.data, iris.target

        >>> all_ensembles = [ExtraTreesClassifier(n_estimators=4).fit(X, y)
        ...                  for i in range(3)]
        >>> big = combine(all_ensembles)
        >>> len(big.estimators_)
        12
        >>> big.n_estimators
        12
        >>> big.score(X, y)
        1.0

        >>> big2 = combine(all_ensembles)
        >>> len(big2.estimators_)
        12

     N/A final_ensemble N/A copy N/A all_ensembles N/A 0 N/A N/A final_ensemble estimators_ N/A N/A ensemble all_ensembles N/A N/A N/A final_ensemble estimators_ N/A ensemble estimators_ N/A N/A final_ensemble n_estimators N/A len N/A final_ensemble estimators_ N/A final_ensemble N/A sub_ensemble N/A N/A ensemble n_estimators seed N/A None N/A N/A Build a new ensemble with a random subset of the sub-estimators

        >>> from sklearn.datasets import load_iris
        >>> from sklearn.ensemble import ExtraTreesClassifier
        >>> iris = load_iris()
        >>> X, y = iris.data, iris.target

        >>> big = ExtraTreesClassifier(n_estimators=10).fit(X, y)
        >>> small = sub_ensemble(big, 3)
        >>> len(small.estimators_)
        3
        >>> small.n_estimators
        3
        >>> small.score(X, y)
        1.0

     N/A rng N/A Random seed N/A final_ensemble N/A copy ensemble N/A N/A n_estimators N/A len N/A ensemble estimators_ N/A N/A N/A ValueError N/A Cannot sample %d estimators from ensemble of %d N/A n_estimators N/A len N/A ensemble estimators_ N/A N/A final_ensemble estimators_ N/A N/A rng sample N/A ensemble estimators_ n_estimators N/A N/A final_ensemble n_estimators N/A len N/A final_ensemble estimators_ N/A final_ensemble N/A train_model N/A N/A model data_filename model_filename random_state N/A None None N/A sklearn.externals joblib N/A N/A X y sample_weight N/A N/A joblib load data_filename mmap_mode r N/A N/A N/A model set_params random_state random_state N/A N/A sample_weight None N/A N/A N/A N/A model fit X y sample_weight sample_weight N/A N/A N/A N/A model fit X y N/A estimator N/A model estimators_ N/A N/A N/A N/A hasattr estimator tree_ N/A hasattr N/A estimator tree_ random_state N/A N/A N/A N/A estimator tree_ random_state 0 N/A N/A model_filename None N/A N/A N/A N/A joblib dump model model_filename N/A model_filename N/A model N/A interactive EnsembleGrower N/A TaskManager N/A N/A Distribute computation of sklearn ensembles

    This works for averaging ensembles like random forests
    or bagging ensembles.

    Does not work with sequential ensembles such as AdaBoost or
    GBRT.

     __init__ N/A N/A self load_balanced_view base_model N/A N/A N/A N/A self tasks N/A N/A N/A self base_model base_model N/A N/A self lb_view load_balanced_view N/A N/A self _temp_files N/A N/A reset N/A N/A self N/A N/A N/A N/A N/A self abort N/A N/A N/A self tasks N/A N/A N/A filename N/A self _temp_files N/A N/A N/A N/A os unlink filename N/A N/A N/A self _temp_files N/A N/A launch N/A N/A self X y sample_weight n_estimators pre_warm folder name dump_models N/A None 1 True . None False N/A N/A N/A N/A self reset N/A N/A name None N/A N/A name N/A N/A N/A N/A uuid uuid4 get_hex N/A N/A N/A N/A N/A os path exists folder N/A N/A N/A N/A os makedirs folder N/A data_filename N/A N/A N/A os path join folder N/A name _data.pkl N/A data_filename N/A N/A N/A os path abspath data_filename N/A N/A host_dump N/A N/A self lb_view client N/A X y sample_weight data_filename pre_warm pre_warm N/A i N/A range n_estimators N/A N/A base_model N/A clone N/A self base_model N/A dump_models N/A N/A model_filename N/A N/A N/A os path join folder N/A name N/A _model_%03d.pkl i N/A model_filename N/A N/A N/A os path abspath model_filename N/A N/A model_filename None N/A N/A N/A N/A self tasks append N/A N/A N/A self lb_view apply train_model base_model data_filename model_filename random_state i N/A self N/A report N/A N/A self n_top N/A 5 N/A N/A output N/A N/A Progress: {0:02d}% ({1:03d}/{2:03d}), elapsed: {3:0.3f}s
 format N/A int N/A 100 N/A N/A self progress N/A N/A self completed N/A N/A self total N/A N/A self elapsed N/A output N/A __repr__ N/A N/A self N/A N/A N/A N/A N/A self report N/A aggregate_model N/A N/A self mmap_mode N/A r N/A N/A ready_models N/A N/A task N/A N/A self completed_tasks N/A N/A result N/A N/A task get N/A N/A isinstance result basestring N/A N/A result N/A N/A joblib load result mmap_mode mmap_mode N/A N/A N/A ready_models append result N/A N/A ready_models N/A N/A None N/A N/A combine ready_models N/A N/A