@@ -604,7 +604,7 @@ class OrthogonalMatchingPursuit(MultiOutputMixin, RegressorMixin, LinearModel):
604
604
Maximum norm of the residual. If not None, overrides n_nonzero_coefs.
605
605
606
606
fit_intercept : bool, default=True
607
- whether to calculate the intercept for this model. If set
607
+ Whether to calculate the intercept for this model. If set
608
608
to false, no intercept will be used in calculations
609
609
(i.e. data is expected to be centered).
610
610
@@ -653,16 +653,18 @@ class OrthogonalMatchingPursuit(MultiOutputMixin, RegressorMixin, LinearModel):
653
653
654
654
.. versionadded:: 1.0
655
655
656
- Examples
656
+ See Also
657
657
--------
658
- >>> from sklearn.linear_model import OrthogonalMatchingPursuit
659
- >>> from sklearn.datasets import make_regression
660
- >>> X, y = make_regression(noise=4, random_state=0)
661
- >>> reg = OrthogonalMatchingPursuit(normalize=False).fit(X, y)
662
- >>> reg.score(X, y)
663
- 0.9991...
664
- >>> reg.predict(X[:1,])
665
- array([-78.3854...])
658
+ orthogonal_mp : Solves n_targets Orthogonal Matching Pursuit problems.
659
+ orthogonal_mp_gram : Solves n_targets Orthogonal Matching Pursuit
660
+ problems using only the Gram matrix X.T * X and the product X.T * y.
661
+ lars_path : Compute Least Angle Regression or Lasso path using LARS algorithm.
662
+ Lars : Least Angle Regression model a.k.a. LAR.
663
+ LassoLars : Lasso model fit with Least Angle Regression a.k.a. Lars.
664
+ sklearn.decomposition.sparse_encode : Generic sparse coding.
665
+ Each column of the result is the solution to a Lasso problem.
666
+ OrthogonalMatchingPursuitCV : Cross-validated
667
+ Orthogonal Matching Pursuit model (OMP).
666
668
667
669
Notes
668
670
-----
@@ -676,15 +678,16 @@ class OrthogonalMatchingPursuit(MultiOutputMixin, RegressorMixin, LinearModel):
676
678
Matching Pursuit Technical Report - CS Technion, April 2008.
677
679
https://www.cs.technion.ac.il/~ronrubin/Publications/KSVD-OMP-v2.pdf
678
680
679
- See Also
681
+ Examples
680
682
--------
681
- orthogonal_mp
682
- orthogonal_mp_gram
683
- lars_path
684
- Lars
685
- LassoLars
686
- sklearn.decomposition.sparse_encode
687
- OrthogonalMatchingPursuitCV
683
+ >>> from sklearn.linear_model import OrthogonalMatchingPursuit
684
+ >>> from sklearn.datasets import make_regression
685
+ >>> X, y = make_regression(noise=4, random_state=0)
686
+ >>> reg = OrthogonalMatchingPursuit(normalize=False).fit(X, y)
687
+ >>> reg.score(X, y)
688
+ 0.9991...
689
+ >>> reg.predict(X[:1,])
690
+ array([-78.3854...])
688
691
"""
689
692
690
693
def __init__ (
@@ -711,13 +714,12 @@ def fit(self, X, y):
711
714
Training data.
712
715
713
716
y : array-like of shape (n_samples,) or (n_samples, n_targets)
714
- Target values. Will be cast to X's dtype if necessary
715
-
717
+ Target values. Will be cast to X's dtype if necessary.
716
718
717
719
Returns
718
720
-------
719
721
self : object
720
- returns an instance of self.
722
+ Returns an instance of self.
721
723
"""
722
724
_normalize = _deprecate_normalize (
723
725
self .normalize , default = True , estimator_name = self .__class__ .__name__
0 commit comments