Skip to content

DOC Applying numpydoc validation to DecisionTreeClassifier #15479

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

Merged
merged 1 commit into from
Nov 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions sklearn/tree/_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,11 +589,11 @@ class DecisionTreeClassifier(ClassifierMixin, BaseDecisionTree):

Parameters
----------
criterion : string, optional (default="gini")
criterion : str, optional (default="gini")
The function to measure the quality of a split. Supported criteria are
"gini" for the Gini impurity and "entropy" for the information gain.

splitter : string, optional (default="best")
splitter : str, optional (default="best")
The strategy used to choose the split at each node. Supported
strategies are "best" to choose the best split and "random" to choose
the best random split.
Expand Down Expand Up @@ -634,7 +634,7 @@ class DecisionTreeClassifier(ClassifierMixin, BaseDecisionTree):
the input samples) required to be at a leaf node. Samples have
equal weight when sample_weight is not provided.

max_features : int, float, string or None, optional (default=None)
max_features : int, float, str or None, optional (default=None)
The number of features to consider when looking for the best split:

- If int, then consider `max_features` features at each split.
Expand Down Expand Up @@ -679,7 +679,7 @@ class DecisionTreeClassifier(ClassifierMixin, BaseDecisionTree):

.. versionadded:: 0.19

min_impurity_split : float, (default=1e-7)
min_impurity_split : float, default=1e-7
Threshold for early stopping in tree growth. A node will split
if its impurity is above the threshold, otherwise it is a leaf.

Expand Down Expand Up @@ -713,7 +713,7 @@ class DecisionTreeClassifier(ClassifierMixin, BaseDecisionTree):
presort : deprecated, default='deprecated'
This parameter is deprecated and will be removed in v0.24.

.. deprecated :: 0.22
.. deprecated:: 0.22

ccp_alpha : non-negative float, optional (default=0.0)
Complexity parameter used for Minimal Cost-Complexity Pruning. The
Expand Down Expand Up @@ -755,6 +755,10 @@ class DecisionTreeClassifier(ClassifierMixin, BaseDecisionTree):
:ref:`sphx_glr_auto_examples_tree_plot_unveil_tree_structure.py`
for basic usage of these attributes.

See Also
--------
DecisionTreeRegressor : A decision tree regressor.

Notes
-----
The default values for the parameters controlling the size of the trees
Expand All @@ -770,10 +774,6 @@ class DecisionTreeClassifier(ClassifierMixin, BaseDecisionTree):
split. To obtain a deterministic behaviour during fitting,
``random_state`` has to be fixed.

See also
--------
DecisionTreeRegressor

References
----------

Expand Down Expand Up @@ -1073,7 +1073,7 @@ class DecisionTreeRegressor(RegressorMixin, BaseDecisionTree):
presort : deprecated, default='deprecated'
This parameter is deprecated and will be removed in v0.24.

.. deprecated :: 0.22
.. deprecated:: 0.22

ccp_alpha : non-negative float, optional (default=0.0)
Complexity parameter used for Minimal Cost-Complexity Pruning. The
Expand Down