class_docstr: Approximate feature map for "skewed chi-squared" kernel.
  
  Read more in the :ref:`User Guide <skewed_chi_kernel_approx>`.
  
  Parameters
  ----------
  skewedness : float, default=1.0
      "skewedness" parameter of the kernel. Needs to be cross-validated.
  
  n_components : int, default=100
      Number of Monte Carlo samples per original feature.
      Equals the dimensionality of the computed feature space.
  
  random_state : int, RandomState instance or None, default=None
      Pseudo-random number generator to control the generation of the random
      weights and random offset when fitting the training data.
      Pass an int for reproducible output across multiple function calls.
      See :term:`Glossary <random_state>`.
  
  Attributes
  ----------
  random_weights_ : ndarray of shape (n_features, n_components)
      Weight array, sampled from a secant hyperbolic distribution, which will
      be used to linearly transform the log of the data.
  
  random_offset_ : ndarray of shape (n_features, n_components)
      Bias term, which will be added to the data. It is uniformly distributed
      between 0 and 2*pi.
  
  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
  --------
  AdditiveChi2Sampler : Approximate feature map for additive chi2 kernel.
  Nystroem : Approximate a kernel map using a subset of the training data.
  RBFSampler : Approximate a RBF kernel feature map using random Fourier
      features.
  SkewedChi2Sampler : Approximate feature map for "skewed chi-squared" kernel.
  sklearn.metrics.pairwise.chi2_kernel : The exact chi squared kernel.
  sklearn.metrics.pairwise.kernel_metrics : List of built-in kernels.
  
  References
  ----------
  See "Random Fourier Approximations for Skewed Multiplicative Histogram
  Kernels" by Fuxin Li, Catalin Ionescu and Cristian Sminchisescu.
  
  Examples
  --------
  >>> from sklearn.kernel_approximation import SkewedChi2Sampler
  >>> from sklearn.linear_model import SGDClassifier
  >>> X = [[0, 0], [1, 1], [1, 0], [0, 1]]
  >>> y = [0, 0, 1, 1]
  >>> chi2_feature = SkewedChi2Sampler(skewedness=.01,
  ...                                  n_components=10,
  ...                                  random_state=0)
  >>> X_features = chi2_feature.fit_transform(X, y)
  >>> clf = SGDClassifier(max_iter=10, tol=1e-3)
  >>> clf.fit(X_features, y)
  SGDClassifier(max_iter=10)
  >>> clf.score(X_features, y)
  1.0
docstr: Apply the approximate feature map to X.
  
  Parameters
  ----------
  X : array-like, shape (n_samples, n_features)
      New data, where `n_samples` is the number of samples
      and `n_features` is the number of features. All values of X must be
      strictly greater than "-skewedness".
  
  Returns
  -------
  X_new : array-like, shape (n_samples, n_components)
      Returns the instance itself.
docstr_tok: ["Apply","the","approximate","feature","map","to","X.","Parameters","--","--","--","--","--","X",":","array-like",",","shape","(","n_samples",",","n_features",")","New","data",",","where","`","n_samples","`","is","the","number","of","samples","and","`","n_features","`","is","the","number","of","features",".","All","values","of","X","must","be","strictly","greater","than","``","-skewedness","''",".","Returns","--","--","--","-","X_new",":","array-like",",","shape","(","n_samples",",","n_components",")","Returns","the","instance","itself","."]
code: def transform(self, X):
      """Apply the approximate feature map to X.
  
      Parameters
      ----------
      X : array-like, shape (n_samples, n_features)
          New data, where `n_samples` is the number of samples
          and `n_features` is the number of features. All values of X must be
          strictly greater than "-skewedness".
  
      Returns
      -------
      X_new : array-like, shape (n_samples, n_components)
          Returns the instance itself.
      """
      check_is_fitted(self)
      X = self._validate_data(
          X, copy=True, dtype=[np.float64, np.float32], reset=False
      )
      if (X <= -self.skewedness).any():
          raise ValueError(
              "X may not contain entries smaller than -skewedness."
          )
  
      X += self.skewedness
      np.log(X, X)
      projection = safe_sparse_dot(X, self.random_weights_)
      projection += self.random_offset_
      np.cos(projection, projection)
      projection *= np.sqrt(2.0) / np.sqrt(self.n_components)
      return projection
  
imports: import warnings
  from numbers import Integral, Real
  import numpy
  import scipy.sparse
  from scipy.linalg import svd
  from .base import BaseEstimator, ClassNamePrefixFeaturesOutMixin, TransformerMixin, _fit_context
  from .metrics.pairwise import KERNEL_PARAMS, PAIRWISE_KERNEL_FUNCTIONS, pairwise_kernels
  from .utils import check_random_state, deprecated
  from .utils._param_validation import Interval, StrOptions
  from .utils.extmath import safe_sparse_dot
  from .utils.validation import _check_feature_names_in, check_is_fitted, check_non_negative
label_desc: Use image node_id 3 for calling the SkewedChi2Sampler obj's underlying member method code with example usage: obj.transform(X) and returns: projection