diff --git a/pyproject.toml b/pyproject.toml index 1c6847affe95f5..0684db80280729 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "scikit-lexicographical-trees" -version = "0.0.2" +version = "0.0.3" description = "A set of python modules for machine learning and data mining" readme = "README.rst" maintainers = [ diff --git a/setup.py b/setup.py index 92ace6e1899c5b..ec007a96f5ffde 100755 --- a/setup.py +++ b/setup.py @@ -53,7 +53,7 @@ # VERSION = sklearn.__version__ -VERSION = "0.0.2" +VERSION = "0.0.3" # Custom clean command to remove build artifacts diff --git a/sklearn/ensemble/_gb.py b/sklearn/ensemble/_gb.py index a778f2ed799224..32f993d719b767 100644 --- a/sklearn/ensemble/_gb.py +++ b/sklearn/ensemble/_gb.py @@ -394,6 +394,9 @@ def __init__( validation_fraction=0.1, n_iter_no_change=None, tol=1e-4, + splitter="best", + feature_groups=None, + threshold_gain=0.0015, ): self.n_estimators = n_estimators self.learning_rate = learning_rate @@ -416,6 +419,9 @@ def __init__( self.validation_fraction = validation_fraction self.n_iter_no_change = n_iter_no_change self.tol = tol + self.splitter = splitter + self.feature_groups = feature_groups + self.threshold_gain = threshold_gain @abstractmethod def _encode_y(self, y=None, sample_weight=None): @@ -470,7 +476,7 @@ def _fit_stage( # induce regression tree on the negative gradient tree = DecisionTreeRegressor( criterion=self.criterion, - splitter="best", + splitter=self.splitter, max_depth=self.max_depth, min_samples_split=self.min_samples_split, min_samples_leaf=self.min_samples_leaf, @@ -480,6 +486,8 @@ def _fit_stage( max_leaf_nodes=self.max_leaf_nodes, random_state=random_state, ccp_alpha=self.ccp_alpha, + threshold_gain=self.threshold_gain, + features_group=self.feature_groups, ) if self.subsample < 1.0: