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.

chaotic_neural_networks.utils.add_collection_curves(ax, ts, data, labels=None, color='indigo', y_lim=None, starting_points=None, Δ=None)[source]

Adds a collection of curves a matplotlib ax.

chaotic_neural_networks.utils.both(f, g)[source]

Generates the function \(t ⟼ (f(t), g(t))\)

chaotic_neural_networks.utils.triple(f, g, h)[source]

Generates the function \(t ⟼ (f(t), g(t), h(t))\)