scanpy.Neighbors.compute_eigen
- Neighbors.compute_eigen(n_comps=15, sym=None, sort='decrease', random_state=0)
Compute eigen decomposition of transition matrix.
- Parameters
- n_comps :
int
int
(default:15
) Number of eigenvalues/vectors to be computed, set
n_comps = 0
if you need all eigenvectors.- sym :
bool
|None
Optional
[bool
] (default:None
) Instead of computing the eigendecomposition of the assymetric transition matrix, computed the eigendecomposition of the symmetric Ktilde matrix.
- random_state :
None
|int
|RandomState
Union
[None
,int
,RandomState
] (default:0
) A numpy random seed
- n_comps :
- Returns
Writes the following attributes.
- eigen_values
ndarray
Eigenvalues of transition matrix.
- eigen_basis
ndarray
Matrix of eigenvectors (stored in columns).
.eigen_basis
is projection of data matrix on right eigenvectors, that is, the projection on the diffusion components. these are simply the components of the right eigenvectors and can directly be used for plotting.
- eigen_values