reservoir_computing.tensorPCA
Classes
Compute PCA on a dataset of multivariate time series represented as a 3-dimensional tensor |
Module Contents
- class reservoir_computing.tensorPCA.tensorPCA(n_components)
Compute PCA on a dataset of multivariate time series represented as a 3-dimensional tensor and reduce the size along the third dimension from
[N, T, V]to[N, T, D], whereD <= V.The input dataset must be a 3-dimensional tensor, where the first dimension
Nrepresents the number of observations, the second dimensionTrepresents the number of time steps in the time series, and the third dimensionVrepresents the number of variables in the time series.- Parameters:
n_components (int) – The number of principal components to keep after the dimensionality reduction. This determines the size of the third dimension
Din the output tensor.
- n_components
- first_eigs = None
- fit(X)
Fit the tensorPCA model to the input dataset
X.Parameters:
- Xnp.ndarray
Time series, 3D array of shape
[N,T,V], whereNis the number of time series,Tis the length of each time series, andVis the number of variables in each.
Returns:
None
- transform(X)
Transform the input dataset X using the tensorPCA model.
Parameters:
- Xnp.ndarray
Time series, 3D array of shape
[N,T,V], whereNis the number of time series,Tis the length of each time series, andVis the number of variables in each.
Returns:
- Xpcanp.ndarray
Transformed time series, 3D array of shape
[N,T,D], whereNis the number of time series,Tis the length of each time series, andDis the number of principal components.
- fit_transform(X)
Fit the tensorPCA model to the input dataset
Xand transform it.Parameters:
- Xnp.ndarray
Time series, 3D array of shape
[N,T,V], whereNis the number of time series,Tis the length of each time series, andVis the number of variables in each.
Returns:
- Xpcanp.ndarray
Transformed time series, 3D array of shape
[N,T,D], whereNis the number of time series,Tis the length of each time series, andDis the number of principal components.