Manifold Learning module (tmrc.manifold_learning)¶
Manifold learning methods for parametrizing the transition manifold.
-
tmrc.manifold_learning.L2distance(system, cloud1, cloud2, rho, epsi)¶ Compute 1/rho-weighted L2 distance between two densities (given by finite samples) using Kernel density estimation. Currently implemented only for two-dimensional systems.
Parameters: - system (System object) – required for boundaries of the state space
- cloud1 (np.array of shape [# points, system dimension]) – contains samples from first density
- cloud2 (np.array of shape [# points, system dimension]) – contains samples from second density
- rho (function(double,double)) – invariant density of the system
- epsi (float) – bandwidth parameter for the kernel density estimation
Returns: distance between the two densities
Return type: float
-
tmrc.manifold_learning.diffusionMaps(distMat, n_components=10, epsi=1.0, alpha=0.5)¶ Solve diffusion map eigenproblem
Parameters: - distMat (symmetric array of shape (n_features, n_features)) – distance matrix
- n_components (int) – number of eigenvalues and eigenvectors to compute NOTE: n_components must be set at least to the number of desired dimensions in the diffusion space to which the data is projected by calling evaluateDiffusionMaps() later on
- epsi (float) – diffusion map kernel bandwidth parameter
- alpha (float) – diffusion map normalization parameter
Returns: the first n_components eigenpairs of the diffusion maps eigenproblem as returned by diffusionMaps()
Return type: tuple of (eigenvalues, eigenvectors)
-
tmrc.manifold_learning.evaluateDiffusionMaps(eigs, n_components)¶ Transform data to diffusion map space
Parameters: - eigs (tuple of (eigenvalues, eigenvectors)) – eigenpairs of the diffusion maps eigenproblem as returned by diffusionMaps(), where eigenvalues is an array of shape (n_features,) and eigenvectors is an array of shape (n_features, n_eigenvectors)
- n_components (int) – number of dimensions in diffusion map space retained by dimensionality reduction NOTE: n_components must be smaller or equal to n_eigenvectors
Returns: the transformed data in diffusion space
Return type: array of shape (n_features, n_components)