Skip to content

Commit

Permalink
Adresses scikit-learn#20308 LogisticRegressionCV
Browse files Browse the repository at this point in the history
  • Loading branch information
gitdoluquita committed Jun 26, 2021
1 parent 508704f commit 01f3944
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
"LocalOutlierFactor",
"LocallyLinearEmbedding",
"LogisticRegression",
"LogisticRegressionCV",
"MDS",
"MLPClassifier",
"MLPRegressor",
Expand Down
16 changes: 7 additions & 9 deletions sklearn/linear_model/_logistic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1938,6 +1938,10 @@ class LogisticRegressionCV(LogisticRegression, LinearClassifierMixin, BaseEstima
.. versionadded:: 0.24
See Also
--------
LogisticRegression : Logistic regression.
Examples
--------
>>> from sklearn.datasets import load_iris
Expand All @@ -1950,11 +1954,6 @@ class LogisticRegressionCV(LogisticRegression, LinearClassifierMixin, BaseEstima
(2, 3)
>>> clf.score(X, y)
0.98...
See Also
--------
LogisticRegression
"""

def __init__(
Expand Down Expand Up @@ -2014,7 +2013,8 @@ def fit(self, X, y, sample_weight=None):
Returns
-------
self : object
self
Fitted LogisticRegressionCV estimator.
"""
solver = _check_solver(self.solver, self.penalty, self.dual)

Expand Down Expand Up @@ -2346,8 +2346,7 @@ def fit(self, X, y, sample_weight=None):
return self

def score(self, X, y, sample_weight=None):
"""Returns the score using the `scoring` option on the given
test data and labels.
"""Return the score using the `scoring` option on the given test data and labels.
Parameters
----------
Expand All @@ -2364,7 +2363,6 @@ def score(self, X, y, sample_weight=None):
-------
score : float
Score of self.predict(X) wrt. y.
"""
scoring = self.scoring or "accuracy"
scoring = get_scorer(scoring)
Expand Down

0 comments on commit 01f3944

Please sign in to comment.