PCATransformer
Principal Components Analysis applied to panel of time series.
Quickstart
from sktime.transformations.pca import PCATransformer
estimator = PCATransformer(n_components=None, copy=True, whiten=False, svd_solver='auto', tol=0.0, iterated_power='auto', random_state=None)Parameters(7)
- n_componentsint, float, str or None (default None)
Number principal components in projection Default = min(num_instances, num_variables * num_time_points) See
sklearn.decomposition.PCAdocumentation for further documentation.- copybool, default=True
- If False, data passed to fit are overwritten and running fit(X).transform(X) will not yield the expected results, use fit_transform(X) instead.
- whitenbool, default=False
When 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.shapeandn_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. - tolfloat, default=0.0
- Tolerance for singular values computed by svd_solver == ‘arpack’. Must be of range [0.0, infinity).
- iterated_powerint or ‘auto’, default=’auto’
- Number of iterations for the power method computed by svd_solver == ‘randomized’. Must be of range [0, infinity).
- random_stateint, RandomState instance or None, default=None
- Used when the ‘arpack’ or ‘randomized’ solvers are used. Pass an int for reproducible results across multiple function calls.