class_docstr: Sparse coding.
  
  Finds a sparse representation of data against a fixed, precomputed
  dictionary.
  
  Each row of the result is the solution to a sparse coding problem.
  The goal is to find a sparse array `code` such that::
  
      X ~= code * dictionary
  
  Read more in the :ref:`User Guide <SparseCoder>`.
  
  Parameters
  ----------
  dictionary : ndarray of shape (n_components, n_features)
      The dictionary atoms used for sparse coding. Lines are assumed to be
      normalized to unit norm.
  
  transform_algorithm : {'lasso_lars', 'lasso_cd', 'lars', 'omp',             'threshold'}, default='omp'
      Algorithm used to transform the data:
  
      - `'lars'`: uses the least angle regression method
        (`linear_model.lars_path`);
      - `'lasso_lars'`: uses Lars to compute the Lasso solution;
      - `'lasso_cd'`: uses the coordinate descent method to compute the
        Lasso solution (linear_model.Lasso). `'lasso_lars'` will be faster if
        the estimated components are sparse;
      - `'omp'`: uses orthogonal matching pursuit to estimate the sparse
        solution;
      - `'threshold'`: squashes to zero all coefficients less than alpha from
        the projection ``dictionary * X'``.
  
  transform_n_nonzero_coefs : int, default=None
      Number of nonzero coefficients to target in each column of the
      solution. This is only used by `algorithm='lars'` and `algorithm='omp'`
      and is overridden by `alpha` in the `omp` case. If `None`, then
      `transform_n_nonzero_coefs=int(n_features / 10)`.
  
  transform_alpha : float, default=None
      If `algorithm='lasso_lars'` or `algorithm='lasso_cd'`, `alpha` is the
      penalty applied to the L1 norm.
      If `algorithm='threshold'`, `alpha` is the absolute value of the
      threshold below which coefficients will be squashed to zero.
      If `algorithm='omp'`, `alpha` is the tolerance parameter: the value of
      the reconstruction error targeted. In this case, it overrides
      `n_nonzero_coefs`.
      If `None`, default to 1.
  
  split_sign : bool, default=False
      Whether to split the sparse feature vector into the concatenation of
      its negative part and its positive part. This can improve the
      performance of downstream classifiers.
  
  n_jobs : int, default=None
      Number of parallel jobs to run.
      ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
      ``-1`` means using all processors. See :term:`Glossary <n_jobs>`
      for more details.
  
  positive_code : bool, default=False
      Whether to enforce positivity when finding the code.
  
      .. versionadded:: 0.20
  
  transform_max_iter : int, default=1000
      Maximum number of iterations to perform if `algorithm='lasso_cd'` or
      `lasso_lars`.
  
      .. versionadded:: 0.22
  
  Attributes
  ----------
  n_components_ : int
      Number of atoms.
  
  n_features_in_ : int
      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
  --------
  DictionaryLearning : Find a dictionary that sparsely encodes data.
  MiniBatchDictionaryLearning : A faster, less accurate, version of the
      dictionary learning algorithm.
  MiniBatchSparsePCA : Mini-batch Sparse Principal Components Analysis.
  SparsePCA : Sparse Principal Components Analysis.
  sparse_encode : Sparse coding where each row of the result is the solution
      to a sparse coding problem.
  
  Examples
  --------
  >>> import numpy as np
  >>> from sklearn.decomposition import SparseCoder
  >>> X = np.array([[-1, -1, -1], [0, 0, 3]])
  >>> dictionary = np.array(
  ...     [[0, 1, 0],
  ...      [-1, -1, 2],
  ...      [1, 1, 1],
  ...      [0, 1, 1],
  ...      [0, 2, 1]],
  ...    dtype=np.float64
  ... )
  >>> coder = SparseCoder(
  ...     dictionary=dictionary, transform_algorithm='lasso_lars',
  ...     transform_alpha=1e-10,
  ... )
  >>> coder.transform(X)
  array([[ 0.,  0., -1.,  0.,  0.],
         [ 0.,  1.,  1.,  0.,  0.]])
code: def _more_tags(self):
      return {
          "requires_fit": False,
          "preserves_dtype": [np.float64, np.float32],
      }
  
imports: import itertools
  import sys
  import time
  from numbers import Integral, Real
  from warnings import warn
  import numpy
  from joblib import effective_n_jobs
  from scipy import linalg
  from ..base import BaseEstimator, ClassNamePrefixFeaturesOutMixin, TransformerMixin, _fit_context
  from ..linear_model import Lars, Lasso, LassoLars, orthogonal_mp_gram
  from ..utils import check_array, check_random_state, gen_batches, gen_even_slices
  from ..utils._param_validation import Hidden, Interval, StrOptions, validate_params
  from ..utils.extmath import randomized_svd, row_norms, svd_flip
  from ..utils.parallel import Parallel, delayed
  from ..utils.validation import check_is_fitted
label_desc: Use image node_id 4 for calling the SparseCoder obj's underlying member method code with example usage: obj._more_tags() and returns: dict