Skip to content

Commit 39bd736

Browse files
rohan-varmaamueller
authored andcommitted
[MRG] Move RandomTreesEmbedding criterion & max_features to be class attributes (#12324)
* rm criterion and max_features from __init__ and store them as class attrs instead * make sure that the docstring comes first
1 parent 00c2f41 commit 39bd736

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sklearn/ensemble/forest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,6 +1896,9 @@ class RandomTreesEmbedding(BaseForest):
18961896
18971897
"""
18981898

1899+
criterion = 'mse'
1900+
max_features = 1
1901+
18991902
def __init__(self,
19001903
n_estimators='warn',
19011904
max_depth=5,
@@ -1925,12 +1928,10 @@ def __init__(self,
19251928
verbose=verbose,
19261929
warm_start=warm_start)
19271930

1928-
self.criterion = 'mse'
19291931
self.max_depth = max_depth
19301932
self.min_samples_split = min_samples_split
19311933
self.min_samples_leaf = min_samples_leaf
19321934
self.min_weight_fraction_leaf = min_weight_fraction_leaf
1933-
self.max_features = 1
19341935
self.max_leaf_nodes = max_leaf_nodes
19351936
self.min_impurity_decrease = min_impurity_decrease
19361937
self.min_impurity_split = min_impurity_split

0 commit comments

Comments
 (0)