-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] DOC Numpy doc validations to LogisticRegression
#15445
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
LogisticRegression
LogisticRegression
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 couple of changes
sklearn/base.py
Outdated
Parameters | ||
---------- | ||
**params : dict | ||
Estimator parameters. |
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.
You should spaces (4 spaces) instead of a tabulation
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.
You still have 4 spaces too much :)
sklearn/base.py
Outdated
|
||
Parameters | ||
---------- | ||
deep : boolean, optional | ||
deep : bool, optional |
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.
deep : bool, optional | |
deep : bool, default=True |
sklearn/base.py
Outdated
Returns | ||
------- | ||
self | ||
self: object |
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.
4 spaces too much
sklearn/base.py
Outdated
Returns | ||
------- | ||
self | ||
self: object | ||
Estimator instance. |
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.
4 spaces too much
sklearn/linear_model/_base.py
Outdated
@@ -210,7 +210,8 @@ def _decision_function(self, X): | |||
dense_output=True) + self.intercept_ | |||
|
|||
def predict(self, X): | |||
"""Predict using the linear model | |||
""" | |||
Predict using the linear model |
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.
Predict using the linear model | |
Predict using the linear model. |
sklearn/linear_model/_logistic.py
Outdated
@@ -1622,6 +1623,8 @@ def predict_proba(self, X): | |||
Parameters | |||
---------- | |||
X : array-like of shape (n_samples, n_features) | |||
Scoring vector, where n_samples is the number of samples and |
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.
Scoring vector, where n_samples is the number of samples and | |
Vector to be scored, where `n_samples` is the number of samples and |
sklearn/linear_model/_logistic.py
Outdated
@@ -1622,6 +1623,8 @@ def predict_proba(self, X): | |||
Parameters | |||
---------- | |||
X : array-like of shape (n_samples, n_features) | |||
Scoring vector, where n_samples is the number of samples and | |||
n_features is the number of features. |
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.
n_features is the number of features. | |
`n_features` is the number of features. |
sklearn/linear_model/_logistic.py
Outdated
@@ -1647,14 +1650,17 @@ def predict_proba(self, X): | |||
return softmax(decision_2d, copy=False) | |||
|
|||
def predict_log_proba(self, X): | |||
"""Log of probability estimates. | |||
""" | |||
Log of probability estimates. |
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.
Log of probability estimates. | |
Predict logarithm of probability estimates. |
sklearn/linear_model/_logistic.py
Outdated
|
||
The returned estimates for all classes are ordered by the | ||
label of classes. | ||
|
||
Parameters | ||
---------- | ||
X : array-like of shape (n_samples, n_features) | ||
Scoring vector, where n_samples is the number of samples and |
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.
Scoring vector, where n_samples is the number of samples and | |
Vector to be scored, where n_samples is the number of samples and |
@tolaa001 Thanks!!! |
Reference Issues/PRs
Contribution to fix part of #15440
What does this implement/fix? Explain your changes.
Ensuring
LogisticRegression
methods pass NumPy doc validation