Utilities – Target functions¶
-
chaotic_neural_networks.utils.
PCA
(data, nb_eig=8, return_matrix=True, return_eigenvalues=True)[source]¶ Principal Component Analysis (PCA) to compute the
nb_eig
leading principal components.Parameters: - data ((n, k) array) – Data points matrix (data points = row vectors in the matrix)
- nb_eig (int, optional) – Number of leading principal components returned
- return_matrix (bool, optional) – If True, returns the matrix of the data points projection on the eigenvectors
- return_eigenvalues (bool, optional) – Returns the eigenvalues.
Returns: - (k, nb_eig) array – Leading principal components/eigenvectors (columnwise).
- Proj ((t_max, N_G) array) – If return_matrix == True: Projection of the data points on the principal eigenvectors.