Number of features seen during :term:`fit`. .. versionadded:: 0.24 feature_names_in_ : ndarray of shape (`n_features_in_`,) Names of features seen during :term:`fit`. Defined only when `X` has feature names that are all strings. .. 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. Notes ----- In `fit`, once the optimal number of non-zero coefficients is found through cross-validation, the model is fit again using the entire training set. Examples -------- >>> from sklearn.linear_model import OrthogonalMatchingPursuitCV >>> from sklearn.datasets import make_regression >>> X, y = make_regression(n_features=100, n_informative=10, ... noise=4, random_state=0) >>> reg = OrthogonalMatchingPursuitCV(cv=5).fit(X, y) >>> reg.score(X, y) 0.9991... >>> reg.n_nonzero_coefs_ np.int64(10) >>> reg.predict(X[:1,]) array([-78.3854...]) rl