-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
added description for classes_ in the logistic documentation #12795
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
Conversation
@amueller |
Please merge master into your branch. |
You can run |
sklearn/linear_model/logistic.py
Outdated
@@ -1178,6 +1178,13 @@ class LogisticRegression(BaseEstimator, LinearClassifierMixin, | |||
Attributes | |||
---------- | |||
|
|||
classes_ : array or shape (n_classes, ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is array or shape
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from looking at other examples, I am guessing it should be:
array, shape (n_classes, )
Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO array, shape ...
or list, shape ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's acceptable
sklearn/linear_model/logistic.py
Outdated
classes_ : array or shape (n_classes, ) | ||
A list of class labels known to the classifier. | ||
|
||
In binary classification, one class is usually considered the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you add this paragraph? I don't think we need it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove this entire sentence:
In binary classification, one class is usually considered the 'positive' class. For example, in labels [-1, 1], 1 is the positive class.
Also add it in LogisticRegressionCV? |
sklearn/linear_model/logistic.py
Outdated
@@ -1503,6 +1506,9 @@ class LogisticRegressionCV(LogisticRegression, BaseEstimator, | |||
|
|||
Parameters | |||
---------- | |||
classes_ : array, shape (n_classes, ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not parameters :)
@@ -1643,6 +1646,8 @@ class LogisticRegressionCV(LogisticRegression, BaseEstimator, | |||
|
|||
Attributes | |||
---------- | |||
classes_ : array, shape (n_classes, ) | |||
A list of class labels known to the classifier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a blank line after it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @reshamas
…essionCV documentation (scikit-learn#12795)
…essionCV documentation (scikit-learn#12795)
…essionCV documentation (scikit-learn#12795)
…sticRegressionCV documentation (scikit-learn#12795)" This reverts commit 1b5a6c7.
…sticRegressionCV documentation (scikit-learn#12795)" This reverts commit 1b5a6c7.
…essionCV documentation (scikit-learn#12795)
Referencing PR / Issue
This closes #12219
Note
added classes_ to logistic regression documentation (logistic.py)
cc: @blooraspberry
#wimlds