Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Ensures that RandomForestClassifier passes numpydoc validation #20383

1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
"RadiusNeighborsClassifier",
"RadiusNeighborsRegressor",
"RadiusNeighborsTransformer",
"RandomForestClassifier",
"RandomTreesEmbedding",
"RandomizedSearchCV",
"RegressorChain",
Expand Down
12 changes: 4 additions & 8 deletions sklearn/ensemble/_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,13 +613,7 @@ def feature_importances_(self):
)
@property
def n_features_(self):
"""Number of features when fitting the estimator.

Returns
-------
n_features_in_ : int
The number of features when fitting the estimator.
"""
"""Number of features when fitting the estimator."""
return self.n_features_in_


Expand Down Expand Up @@ -1293,7 +1287,9 @@ class labels (multi-output problem).

See Also
--------
DecisionTreeClassifier, ExtraTreesClassifier
sklearn.tree.DecisionTreeClassifier : A decision tree classifier.
sklearn.ensemble.ExtraTreesClassifier : Ensemble of extremely randomized
tree classifiers.

Notes
-----
Expand Down