@@ -1386,6 +1386,16 @@ class DecisionTreeRegressor(RegressorMixin, BaseDecisionTree):
1386
1386
1387
1387
.. versionadded:: 0.22
1388
1388
1389
+ store_leaf_values : bool, default=False
1390
+ Whether to store the samples that fall into leaves in the ``tree_`` attribute.
1391
+ Each leaf will store a 2D array corresponding to the samples that fall into it
1392
+ keyed by node_id.
1393
+
1394
+ XXX: This is currently experimental and may change without notice.
1395
+ Moreover, it can be improved upon since storing the samples twice is not ideal.
1396
+ One could instead store the indices in ``y_train`` that fall into each leaf,
1397
+ which would lower RAM/diskspace usage.
1398
+
1389
1399
Attributes
1390
1400
----------
1391
1401
feature_importances_ : ndarray of shape (n_features,)
@@ -1713,6 +1723,16 @@ class ExtraTreeClassifier(DecisionTreeClassifier):
1713
1723
1714
1724
.. versionadded:: 0.22
1715
1725
1726
+ store_leaf_values : bool, default=False
1727
+ Whether to store the samples that fall into leaves in the ``tree_`` attribute.
1728
+ Each leaf will store a 2D array corresponding to the samples that fall into it
1729
+ keyed by node_id.
1730
+
1731
+ XXX: This is currently experimental and may change without notice.
1732
+ Moreover, it can be improved upon since storing the samples twice is not ideal.
1733
+ One could instead store the indices in ``y_train`` that fall into each leaf,
1734
+ which would lower RAM/diskspace usage.
1735
+
1716
1736
Attributes
1717
1737
----------
1718
1738
classes_ : ndarray of shape (n_classes,) or list of ndarray
@@ -1959,6 +1979,16 @@ class ExtraTreeRegressor(DecisionTreeRegressor):
1959
1979
1960
1980
.. versionadded:: 0.22
1961
1981
1982
+ store_leaf_values : bool, default=False
1983
+ Whether to store the samples that fall into leaves in the ``tree_`` attribute.
1984
+ Each leaf will store a 2D array corresponding to the samples that fall into it
1985
+ keyed by node_id.
1986
+
1987
+ XXX: This is currently experimental and may change without notice.
1988
+ Moreover, it can be improved upon since storing the samples twice is not ideal.
1989
+ One could instead store the indices in ``y_train`` that fall into each leaf,
1990
+ which would lower RAM/diskspace usage.
1991
+
1962
1992
Attributes
1963
1993
----------
1964
1994
max_features_ : int
0 commit comments