Skip to content

Commit 0056936

Browse files
thomasjpfanjnothman
authored andcommitted
CLN Removes ccp_alpha from RandomTreesEmbedding (scikit-learn#15708)
1 parent 538b324 commit 0056936

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

doc/whats_new/v0.22.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,6 @@ Changelog
829829
:class:`ensemble.RandomForestRegressor`,
830830
:class:`ensemble.ExtraTreesClassifier`,
831831
:class:`ensemble.ExtraTreesRegressor`,
832-
:class:`ensemble.RandomTreesEmbedding`,
833832
:class:`ensemble.GradientBoostingClassifier`,
834833
and :class:`ensemble.GradientBoostingRegressor`.
835834
:pr:`12887` by `Thomas Fan`_.

sklearn/ensemble/_forest.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,14 +2112,6 @@ class RandomTreesEmbedding(BaseForest):
21122112
and add more estimators to the ensemble, otherwise, just fit a whole
21132113
new forest. See :term:`the Glossary <warm_start>`.
21142114
2115-
ccp_alpha : non-negative float, optional (default=0.0)
2116-
Complexity parameter used for Minimal Cost-Complexity Pruning. The
2117-
subtree with the largest cost complexity that is smaller than
2118-
``ccp_alpha`` will be chosen. By default, no pruning is performed. See
2119-
:ref:`minimal_cost_complexity_pruning` for details.
2120-
2121-
.. versionadded:: 0.22
2122-
21232115
max_samples : int or float, default=None
21242116
If bootstrap is True, the number of samples to draw from X
21252117
to train each base estimator.
@@ -2163,7 +2155,6 @@ def __init__(self,
21632155
random_state=None,
21642156
verbose=0,
21652157
warm_start=False,
2166-
ccp_alpha=0.0,
21672158
max_samples=None):
21682159
super().__init__(
21692160
base_estimator=ExtraTreeRegressor(),
@@ -2172,7 +2163,7 @@ def __init__(self,
21722163
"min_samples_leaf", "min_weight_fraction_leaf",
21732164
"max_features", "max_leaf_nodes",
21742165
"min_impurity_decrease", "min_impurity_split",
2175-
"random_state", "ccp_alpha"),
2166+
"random_state"),
21762167
bootstrap=False,
21772168
oob_score=False,
21782169
n_jobs=n_jobs,
@@ -2189,7 +2180,6 @@ def __init__(self,
21892180
self.min_impurity_decrease = min_impurity_decrease
21902181
self.min_impurity_split = min_impurity_split
21912182
self.sparse_output = sparse_output
2192-
self.ccp_alpha = ccp_alpha
21932183

21942184
def _set_oob_score(self, X, y):
21952185
raise NotImplementedError("OOB score not supported by tree embedding")

0 commit comments

Comments
 (0)