class_docstr: Principal components analysis (PCA) algorithm. 
  It uses singular value decomposition to project the data into
  a lower dimensional space.
  
  :param n_components: number of components or the way it should be chosen.
      If it's an integer value, it's simply the number of components.
      If it's a float value and 0 < n_components < 1, set the number of components so that variance is greater than this value.
      If n_components = None, set the number of components as min(data.width, data.height).
  :type n_components: int, float, default=None
  :param svd_solver: full or randomized svd algorithm
  :type svd_solver: str, ['full', 'randomized'], default='full'
class_docstr_tok: ["Principal","components","analysis","(","PCA",")","algorithm",".","It","uses","singular","value","decomposition","to","project","the","data","into","a","lower","dimensional","space",".",":","param","n_components",":","number","of","components","or","the","way","it","should","be","chosen",".","If","it","'s","an","integer","value",",","it","'s","simply","the","number","of","components",".","If","it","'s","a","float","value","and","0","<","n_components","<","1",",","set","the","number","of","components","so","that","variance","is","greater","than","this","value",".","If","n_components","=","None",",","set","the","number","of","components","as","min","(","data.width",",","data.height",")",".",":","type","n_components",":","int",",","float",",","default=None",":","param","svd_solver",":","full","or","randomized","svd","algorithm",":","type","svd_solver",":","str",",","[","'full","'",",","'randomized","'","]",",","default='full","'"]
docstr: Performs linear dimensionality reduction of the given data:
  finds the singular vectors and selects the required number of them
  to be principal components, preferring the vectors that correspond
  to the largest singular values.
  
  Then projects the dataset onto the principal components axes and returns the result.
  
  :param X: the input sample. Internally, it will be converted
      to ``dtype=np.float32``, and if a sparse matrix is provided -
      to a sparse ``scipy.csr_matrix``.
  :type X: {array-like, sparse matrix} of shape (n_samples, n_features)
  
  :return: projection of the data into a lower dimensional space.
  :rtype: *generator of ndarray of shape (n_samples, n_components)*
docstr_tok: ["Performs","linear","dimensionality","reduction","of","the","given","data",":","finds","the","singular","vectors","and","selects","the","required","number","of","them","to","be","principal","components",",","preferring","the","vectors","that","correspond","to","the","largest","singular","values",".","Then","projects","the","dataset","onto","the","principal","components","axes","and","returns","the","result",".",":","param","X",":","the","input","sample",".","Internally",",","it","will","be","converted","to","``","dtype=np.float32","``",",","and","if","a","sparse","matrix","is","provided","-","to","a","sparse","``","scipy.csr_matrix","``",".",":","type","X",":","{","array-like",",","sparse","matrix","}","of","shape","(","n_samples",",","n_features",")",":","return",":","projection","of","the","data","into","a","lower","dimensional","space",".",":","rtype",":","*","generator","of","ndarray","of","shape","(","n_samples",",","n_components",")","*"]
code: def fit_transform(self, X):
      """Performs linear dimensionality reduction of the given data:
      finds the singular vectors and selects the required number of them
      to be principal components, preferring the vectors that correspond
      to the largest singular values.
  
      Then projects the dataset onto the principal components axes and returns the result.
  
      :param X: the input sample. Internally, it will be converted
          to ``dtype=np.float32``, and if a sparse matrix is provided -
          to a sparse ``scipy.csr_matrix``.
      :type X: {array-like, sparse matrix} of shape (n_samples, n_features)
  
      :return: projection of the data into a lower dimensional space.
      :rtype: *generator of ndarray of shape (n_samples, n_components)*
      """
      x = convert_data(X)
  
      return super().fit_transform(*x.shape, *get_data(x))
  
file_path: neoml/NeoML/Python/neoml/PCA.py
imports: import numpy
  from .Utils import convert_data, get_data
  from scipy.sparse import csr_matrix
  import neoml.PythonWrapper
label_desc: Use image node_id 3 for calling the PCA obj's underlying member method code with example usage: obj.fit_transform(X) and returns: super