Skip to content

Commit

Permalink
DOC Ensures that OrthogonalMatchingPursuitCV passes numpydoc validati…
Browse files Browse the repository at this point in the history
…on (#21412)
  • Loading branch information
spikebh authored and glemaitre committed Oct 25, 2021
1 parent cd927c0 commit 112ae4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
DOCSTRING_IGNORE_LIST = [
"LabelSpreading",
"MultiTaskElasticNetCV",
"OrthogonalMatchingPursuitCV",
"PassiveAggressiveRegressor",
"SpectralCoclustering",
"SpectralEmbedding",
Expand Down
31 changes: 16 additions & 15 deletions sklearn/linear_model/_omp.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ class OrthogonalMatchingPursuitCV(RegressorMixin, LinearModel):
copy is made anyway.
fit_intercept : bool, default=True
whether to calculate the intercept for this model. If set
Whether to calculate the intercept for this model. If set
to false, no intercept will be used in calculations
(i.e. data is expected to be centered).
Expand Down Expand Up @@ -953,6 +953,20 @@ class OrthogonalMatchingPursuitCV(RegressorMixin, LinearModel):
.. versionadded:: 1.0
See Also
--------
orthogonal_mp : Solves n_targets Orthogonal Matching Pursuit problems.
orthogonal_mp_gram : Solves n_targets Orthogonal Matching Pursuit
problems using only the Gram matrix X.T * X and the product X.T * y.
lars_path : Compute Least Angle Regression or Lasso path using LARS algorithm.
Lars : Least Angle Regression model a.k.a. LAR.
LassoLars : Lasso model fit with Least Angle Regression a.k.a. Lars.
OrthogonalMatchingPursuit : Orthogonal Matching Pursuit model (OMP).
LarsCV : Cross-validated Least Angle Regression model.
LassoLarsCV : Cross-validated Lasso model fit with Least Angle Regression.
sklearn.decomposition.sparse_encode : Generic sparse coding.
Each column of the result is the solution to a Lasso problem.
Examples
--------
>>> from sklearn.linear_model import OrthogonalMatchingPursuitCV
Expand All @@ -966,19 +980,6 @@ class OrthogonalMatchingPursuitCV(RegressorMixin, LinearModel):
10
>>> reg.predict(X[:1,])
array([-78.3854...])
See Also
--------
orthogonal_mp
orthogonal_mp_gram
lars_path
Lars
LassoLars
OrthogonalMatchingPursuit
LarsCV
LassoLarsCV
sklearn.decomposition.sparse_encode
"""

def __init__(
Expand Down Expand Up @@ -1014,7 +1015,7 @@ def fit(self, X, y):
Returns
-------
self : object
returns an instance of self.
Returns an instance of self.
"""

_normalize = _deprecate_normalize(
Expand Down

0 comments on commit 112ae4e

Please sign in to comment.