scHopfield.tools.compute_eigenanalysis
- scHopfield.tools.compute_eigenanalysis(adata: AnnData, cluster_key: str = 'cell_type', copy: bool = False) AnnData | None[source]
Compute eigenvalue decomposition for each cluster’s interaction matrix.
Performs eigendecomposition (eigenvalues and eigenvectors) on the interaction matrices W for each cluster. Results are stored in adata.uns[‘scHopfield’][‘eigenanalysis’].
- Parameters:
- Returns:
Returns adata if copy=True, otherwise None. Adds to adata.uns[‘scHopfield’][‘eigenanalysis’] for each cluster: - ‘eigenvalues_{cluster}’: complex eigenvalues array - ‘eigenvectors_{cluster}’: complex eigenvectors matrix
- Return type:
AnnData or None
Notes
Eigenvalues with large positive real parts indicate unstable directions. Eigenvalues with large negative real parts indicate fast decay directions. The eigenvectors show which gene combinations are associated with these dynamics.