class_docstr: Base class for PCA methods.
  
  Warning: This class should not be used directly.
  Use derived classes instead.
docstr: Apply dimensionality reduction to X.
  
  X is projected on the first principal components previously extracted
  from a training set.
  
  Parameters
  ----------
  X : array-like of shape (n_samples, n_features)
      New data, where `n_samples` is the number of samples
      and `n_features` is the number of features.
  
  Returns
  -------
  X_new : array-like of shape (n_samples, n_components)
      Projection of X in the first principal components, where `n_samples`
      is the number of samples and `n_components` is the number of the components.
docstr_tok: ["Apply","dimensionality","reduction","to","X.","X","is","projected","on","the","first","principal","components","previously","extracted","from","a","training","set",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_samples",",","n_features",")","New","data",",","where","`","n_samples","`","is","the","number","of","samples","and","`","n_features","`","is","the","number","of","features",".","Returns","--","--","--","-","X_new",":","array-like","of","shape","(","n_samples",",","n_components",")","Projection","of","X","in","the","first","principal","components",",","where","`","n_samples","`","is","the","number","of","samples","and","`","n_components","`","is","the","number","of","the","components","."]
code: def transform(self, X):
      """Apply dimensionality reduction to X.
  
      X is projected on the first principal components previously extracted
      from a training set.
  
      Parameters
      ----------
      X : array-like of shape (n_samples, n_features)
          New data, where `n_samples` is the number of samples
          and `n_features` is the number of features.
  
      Returns
      -------
      X_new : array-like of shape (n_samples, n_components)
          Projection of X in the first principal components, where `n_samples`
          is the number of samples and `n_components` is the number of the components.
      """
      check_is_fitted(self)
  
      X = self._validate_data(
          X, dtype=[np.float64, np.float32], reset=False
      )
      if self.mean_ is not None:
          X = X - self.mean_
      X_transformed = np.dot(X, self.components_.T)
      if self.whiten:
          X_transformed /= np.sqrt(self.explained_variance_)
      return X_transformed
  
file_path: catboost/contrib/python/scikit-learn/py3/sklearn/decomposition/_base.py
imports: from abc import ABCMeta, abstractmethod
  import numpy
  from scipy import linalg
  from ..base import BaseEstimator, ClassNamePrefixFeaturesOutMixin, TransformerMixin
  from ..utils.validation import check_is_fitted
label_desc: Use image node_id 4 for calling the _BasePCA obj's underlying member method code with example usage: obj.transform(X) and returns: X_transformed