Skip to content

DOC Ensures that OrthogonalMatchingPursuitCV passes numpydoc validation #21412

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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