Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TST Add test for documentation of the classes_ attribute #16277

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

Conversation

judithabk6
Copy link
Contributor

adding a test to ensure the classes_ attribute is documented in all classifiers.
towards #16273

was originally implemented in PR #12509 by @jrbourbeau

@lesteve
Copy link
Member

lesteve commented Jan 29, 2020

Nice first step, as you can see in https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=12718&view=ms.vss-test-web.build-test-results-tab, the failed tests are the ones I was talking about in #16273.

@lesteve
Copy link
Member

lesteve commented Jan 29, 2020

Just to be clear, I would suggest fixing the tests in this PR, for CheckingClassifier, it can be skipped because it is only used for tests, so it is probably not necessary to "force" some documentation on it.

@judithabk6
Copy link
Contributor Author

contributes to #14312 for HistGradientBoostingClassifier attribute classes_

Co-Authored-By: Alexandre Gramfort <[email protected]>
Copy link
Member

@lesteve lesteve left a comment

Choose a reason for hiding this comment

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

Looks good, only one small comment:


Attributes
----------
classes_ : array, shape = (n_classes,)
Copy link
Member

Choose a reason for hiding this comment

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

That is the only thing I am not sure about ...

Should we "force" the documentation on some classes that are only used for tests like CheckingClassifier? I would be enclined to skip the test instead but I don't have a strong opinion.

An alternative is to do a minimal documentation as was done for the parameters a few lines above, i.e.:

Attributes
----------
classes_

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok. Definitely more consistent with the parameter documentation. Doing it right now.
don't know about skipping the test.

Copy link
Member

Choose a reason for hiding this comment

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

The minimal documentation approach is simpler, so let's do this and see whether others have a different opinion.

@lesteve lesteve changed the title implement test for documentation of the classes_ attribute from PR #1… Implement test for documentation of the classes_ attribute Jan 29, 2020
Copy link
Member

@lesteve lesteve left a comment

Choose a reason for hiding this comment

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

LGTM

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 @judithabk6 !

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @judithabk6 !

@rth rth changed the title Implement test for documentation of the classes_ attribute TST Add test for documentation of the classes_ attribute Jan 31, 2020
@rth rth merged commit 05476a1 into scikit-learn:master Jan 31, 2020
thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Feb 22, 2020
panpiort8 pushed a commit to panpiort8/scikit-learn that referenced this pull request Mar 3, 2020
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.

6 participants