Skip to content

MNT Minor clean up in OneVsOneClassifier#13677

Merged
NicolasHug merged 6 commits intoscikit-learn:masterfrom
qinhanmin2014:OneVsOneClassifier
Apr 22, 2019
Merged

MNT Minor clean up in OneVsOneClassifier#13677
NicolasHug merged 6 commits intoscikit-learn:masterfrom
qinhanmin2014:OneVsOneClassifier

Conversation

@qinhanmin2014
Copy link
Copy Markdown
Member

We use getattr to get _pairwise so we won't get AttributeError.

Copy link
Copy Markdown
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

LGTM but I don't see this attribute being described in any docstring. Should it be private?

@qinhanmin2014
Copy link
Copy Markdown
Member Author

LGTM but I don't see this attribute being described in any docstring. Should it be private?

I guess it's not easy to make things private, even for those things which are not documented.

Co-Authored-By: qinhanmin2014 <qinhanmin2005@sina.com>
classes_ : numpy array of shape [n_classes]
Array containing labels.

pairwise_indices_ : list, length = ``n_classes * (n_classes - 1) / 2``,
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 needs a \ at the end for the line continuation to render correctly

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.

But you can just use len(estimators_) here for brevity

@NicolasHug NicolasHug merged commit df767eb into scikit-learn:master Apr 22, 2019
@NicolasHug
Copy link
Copy Markdown
Member

Merging, it looks like test_docstring_parameters.py is going a bit crazy on CI lately

@qinhanmin2014 qinhanmin2014 deleted the OneVsOneClassifier branch April 22, 2019 14:14
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Apr 25, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants