Flow
sklearn.decomposition.pca.PCA

sklearn.decomposition.pca.PCA

Visibility: public Uploaded 09-03-2020 by Koralp Catalsakal sklearn==0.20.1 numpy>=1.6.1 scipy>=0.9 0 runs
0 likes downloaded by 0 people 0 issues 0 downvotes , 0 total downloads
  • openml-python python scikit-learn sklearn sklearn_0.20.1
Issue #Downvotes for this reason By


Loading wiki
Help us complete this description Edit
Principal component analysis (PCA) Linear dimensionality reduction using Singular Value Decomposition of the data to project it to a lower dimensional space. It uses the LAPACK implementation of the full SVD or a randomized truncated SVD by the method of Halko et al. 2009, depending on the shape of the input data and the number of components to extract. It can also use the scipy.sparse.linalg ARPACK implementation of the truncated SVD. Notice that this class does not support sparse input. See :class:`TruncatedSVD` for an alternative with sparse data.

Parameters

copyIf False, data passed to fit are overwritten and running fit(X).transform(X) will not yield the expected results, use fit_transform(X) insteaddefault: true
iterated_powerNumber of iterations for the power method computed by svd_solver == 'randomized' .. versionadded:: 0.18.0default: "auto"
n_componentsNumber of components to keep if n_components is not set all components are kept:: n_components == min(n_samples, n_features) If ``n_components == 'mle'`` and ``svd_solver == 'full'``, Minka's MLE is used to guess the dimension. Use of ``n_components == 'mle'`` will interpret ``svd_solver == 'auto'`` as ``svd_solver == 'full'`` If ``0 < n_components < 1`` and ``svd_solver == 'full'``, select the number of components such that the amount of variance that needs to be explained is greater than the percentage specified by n_components If ``svd_solver == 'arpack'``, the number of components must be strictly less than the minimum of n_features and n_samples Hence, the None case results in:: n_components == min(n_samples, n_features) - 1default: 2
random_stateIf int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by `np.random`. Used when ``svd_solver`` == 'arpack' or 'randomized' .. versionadded:: 0.18.0default: 35416
svd_solverauto : the solver is selected by a default policy based on `X.shape` and `n_components`: if the input data is larger than 500x500 and the number of components to extract is lower than 80% of the smallest dimension of the data, then the more efficient 'randomized' method is enabled. Otherwise the exact full SVD is computed and optionally truncated afterwards full : run exact full SVD calling the standard LAPACK solver via `scipy.linalg.svd` and select the components by postprocessing arpack : run SVD truncated to n_components calling ARPACK solver via `scipy.sparse.linalg.svds`. It requires strictly 0 < n_components < min(X.shape) randomized : run randomized SVD by the method of Halko et al .. versionadded:: 0.18.0default: "auto"
tolTolerance for singular values computed by svd_solver == 'arpack' .. versionadded:: 0.18.0default: 0.0
whitenWhen True (False by default) the `components_` vectors are multiplied by the square root of n_samples and then divided by the singular values to ensure uncorrelated outputs with unit component-wise variances Whitening will remove some information from the transformed signal (the relative variance scales of the components) but can sometime improve the predictive accuracy of the downstream estimators by making their data respect some hard-wired assumptionsdefault: false

0
Runs

List all runs
Parameter:
Rendering chart
Rendering table