Skip to content

Enable links to objects in docstrings (Sprint Issue #17417)#17488

Merged
thomasjpfan merged 6 commits intoscikit-learn:masterfrom
poorna-kumar:skl_sprint_20200606_links_to_dosctrings
Jun 6, 2020
Merged

Enable links to objects in docstrings (Sprint Issue #17417)#17488
thomasjpfan merged 6 commits intoscikit-learn:masterfrom
poorna-kumar:skl_sprint_20200606_links_to_dosctrings

Conversation

@poorna-kumar
Copy link
Copy Markdown
Contributor

@poorna-kumar poorna-kumar commented Jun 6, 2020

Submitted as part of an sklearn open source sprint. Pair programming with @AnilKumarTeegala.

Reference Issues/PRs

Partially addresses #17417 (for a subset of classes).

What does this implement/fix? Explain your changes.

This PR adds docstring links to the following classes:

sklearn.ensemble.StackingRegressor
sklearn.ensemble.StackingClassifer
sklearn.ensemble.AdaBoostClassifier
sklearn.ensemble.AdaBoostRegressor

Any other comments?

Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @poorna-kumar !

The module structure is the following:

- The ``BaseWeightBoosting`` base class implements a common ``fit`` method
- The :class:`~sklearn.ensemble.BaseWeightBoosting` base class implements a common ``fit`` method
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be reverted, since BaseWeightBoosting is not a public class and would not link.

See Also
--------
AdaBoostRegressor
:class:`~sklearn.ensemble.AdaBoostRegressor`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The estimators in "See Also" automatically link correctly.

--------
AdaBoostClassifier, GradientBoostingRegressor,
sklearn.tree.DecisionTreeRegressor
:class:`~sklearn.ensemble.AdaBoostClassifier`,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be reverted. This links correctly as well.

@amueller
Copy link
Copy Markdown
Member

amueller commented Jun 6, 2020

Thanks for the PR! you have a linting failure.

@poorna-kumar poorna-kumar force-pushed the skl_sprint_20200606_links_to_dosctrings branch 2 times, most recently from a29725a to 5b603a2 Compare June 6, 2020 19:12
only a single regression tree is induced.

sklearn.tree.DecisionTreeClassifier
DecisionTreeClassifier
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still needs to be reverted because DecisionTreeClassifier is not a part of the sklearn.ensemble module.

@poorna-kumar poorna-kumar force-pushed the skl_sprint_20200606_links_to_dosctrings branch from 5b603a2 to e1a7576 Compare June 6, 2020 19:15
Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thank you @poorna-kumar and @AnilKumarTeegala!

@thomasjpfan thomasjpfan merged commit 324d3b5 into scikit-learn:master Jun 6, 2020
@poorna-kumar poorna-kumar deleted the skl_sprint_20200606_links_to_dosctrings branch June 6, 2020 21:44
@reshamas
Copy link
Copy Markdown
Member

reshamas commented Jun 6, 2020

#DataUmbrella sprint

viclafargue pushed a commit to viclafargue/scikit-learn that referenced this pull request Jun 26, 2020
…17417) (scikit-learn#17488)

* add StackingClassifier docstring links to objects

* add StackingRegressor docstring links to objects

* add AdaboostRegressor docstring links to objects

* add AdaboostClassifier docstring links to objects; also add docstring links to file-level docstring

* fix flake8 violations

* reviewer comments
jayzed82 pushed a commit to jayzed82/scikit-learn that referenced this pull request Oct 22, 2020
…17417) (scikit-learn#17488)

* add StackingClassifier docstring links to objects

* add StackingRegressor docstring links to objects

* add AdaboostRegressor docstring links to objects

* add AdaboostClassifier docstring links to objects; also add docstring links to file-level docstring

* fix flake8 violations

* reviewer comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants