Skip to content

Commit f2a6e10

Browse files
alinealfaglemaitre
andauthored
DOC Ensures that RandomForestClassifier passes numpydoc validation (scikit-learn#20383)
Co-authored-by: Guillaume Lemaitre <[email protected]>
1 parent 1fa9ce9 commit f2a6e10

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

maint_tools/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@
126126
"RadiusNeighborsClassifier",
127127
"RadiusNeighborsRegressor",
128128
"RadiusNeighborsTransformer",
129-
"RandomForestClassifier",
130129
"RandomTreesEmbedding",
131130
"RandomizedSearchCV",
132131
"RegressorChain",

sklearn/ensemble/_forest.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -613,13 +613,7 @@ def feature_importances_(self):
613613
)
614614
@property
615615
def n_features_(self):
616-
"""Number of features when fitting the estimator.
617-
618-
Returns
619-
-------
620-
n_features_in_ : int
621-
The number of features when fitting the estimator.
622-
"""
616+
"""Number of features when fitting the estimator."""
623617
return self.n_features_in_
624618

625619

@@ -1293,7 +1287,9 @@ class labels (multi-output problem).
12931287
12941288
See Also
12951289
--------
1296-
DecisionTreeClassifier, ExtraTreesClassifier
1290+
sklearn.tree.DecisionTreeClassifier : A decision tree classifier.
1291+
sklearn.ensemble.ExtraTreesClassifier : Ensemble of extremely randomized
1292+
tree classifiers.
12971293
12981294
Notes
12991295
-----

0 commit comments

Comments
 (0)