Flow
sklearn.decomposition._pca.PCA

sklearn.decomposition._pca.PCA

Visibility: public Uploaded 29-06-2023 by Luís Miguel Matos sklearn==1.2.2 numpy>=1.17.3 scipy>=1.3.2 joblib>=1.1.1 threadpoolctl>=2.0.0 0 runs
0 likes downloaded by 0 people 0 issues 0 downvotes , 0 total downloads
  • openml-python python scikit-learn sklearn sklearn_1.2.2
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. The input data is centered but not scaled for each feature before applying the SVD. 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' Must be of range [0, infinity) .. 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: 3
n_oversamplesThis parameter is only relevant when `svd_solver="randomized"` It corresponds to the additional number of random vectors to sample the range of `X` so as to ensure proper conditioning. See :func:`~sklearn.utils.extmath.randomized_svd` for more details .. versionadded:: 1.1 power_iteration_normalizer : {'auto', 'QR', 'LU', 'none'}, default='auto' Power iteration normalizer for randomized SVD solver Not used by ARPACK. See :func:`~sklearn.utils.extmath.randomized_svd` for more details .. versionadded:: 1.1default: 10
power_iteration_normalizerdefault: "auto"
random_stateUsed when the 'arpack' or 'randomized' solvers are used. Pass an int for reproducible results across multiple function calls See :term:`Glossary ` .. versionadded:: 0.18.0default: null
svd_solverdefault: "auto"
tolTolerance for singular values computed by svd_solver == 'arpack' Must be of range [0.0, infinity) .. 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 assumptions svd_solver : {'auto', 'full', 'arpack', 'randomized'}, default='auto' If auto : 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 If full : run exact full SVD calling th...default: false

0
Runs

List all runs
Parameter:
Rendering chart
Rendering table