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 Improve docs of BaseLabelPropagation.transduction_ #24985

Merged
merged 6 commits into from
Dec 1, 2022

Conversation

scottgigante-immunai
Copy link
Contributor

The relationship between fit and transduction_ is not super clear. This PR improves the documentation around that. Closes #24898.

@@ -105,6 +105,34 @@ class BaseLabelPropagation(ClassifierMixin, BaseEstimator, metaclass=ABCMeta):
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
for more details.

Attributes
Copy link
Member

Choose a reason for hiding this comment

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

I don't know what the convention is -> unsure if the extra docs on BaseLabelPropagation make sense as users can't directly import/access this class.

Does someone know?

Copy link
Member

Choose a reason for hiding this comment

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

Traditionally, we only include Attribute docs for public classes. For example, BaseDecisionTree does not include any docs for Attributes because it is private:

class BaseDecisionTree(MultiOutputMixin, BaseEstimator, metaclass=ABCMeta):

In this case, since BaseLabelPropagation is a private class, I would not include the Attributes section here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks!

Copy link
Member

@betatim betatim left a comment

Choose a reason for hiding this comment

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

Except for the question to an experienced maintainer this looks good to me

Copy link
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!

@@ -105,6 +105,34 @@ class BaseLabelPropagation(ClassifierMixin, BaseEstimator, metaclass=ABCMeta):
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
for more details.

Attributes
Copy link
Member

Choose a reason for hiding this comment

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

Traditionally, we only include Attribute docs for public classes. For example, BaseDecisionTree does not include any docs for Attributes because it is private:

class BaseDecisionTree(MultiOutputMixin, BaseEstimator, metaclass=ABCMeta):

In this case, since BaseLabelPropagation is a private class, I would not include the Attributes section here.

Copy link
Member

@betatim betatim left a comment

Choose a reason for hiding this comment

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

LGTM

@thomasjpfan thomasjpfan changed the title Improve docs of BaseLabelPropagation.transduction_ DOC Improve docs of BaseLabelPropagation.transduction_ Nov 25, 2022
@glemaitre glemaitre merged commit 2b34dfd into scikit-learn:main Dec 1, 2022
@glemaitre
Copy link
Member

LGTM. Thanks @scottgigante-immunai

jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 23, 2023
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.

None yet

5 participants