cellrank.tl.estimators.GPCCA.predict
- GPCCA.predict(method=TermStatesMethod.STABILITY, n_cells=30, alpha=1, stability_threshold=0.96, n_states=None)[source]
Automatically select terminal states from macrostates.
- Parameters
method (
Literal
[‘stability’, ‘top_n’, ‘eigengap’, ‘eigengap_coarse’]) –How to select the terminal states. Valid option are:
’eigengap’ - select the number of states based on the eigengap of
transition_matrix
.’eigengap_coarse’ - select the number of states based on the eigengap of the diagonal of
coarse_T
.’top_n’ - select top
n_states
based on the probability of the diagonal ofcoarse_T
.’stability’ - select states which have a stability >=
stability_threshold
. The stability is given by the diagonal elements ofcoarse_T
.
n_cells (
int
) – Number of most likely cells from each macrostate to select.alpha (
Optional
[float
]) – Weight given to the deviation of an eigenvalue from one. Only used whenmethod = 'eigengap'
ormethod = 'eigengap_coarse'
.stability_threshold (
float
) – Threshold used whenmethod = 'stability'
.n_states (
Optional
[int
]) – Number of states used whenmethod = 'top_n'
.
- Return type
- Returns
Nothing, just updates the following fields:
terminal_states
- Categorical annotation of terminal states.terminal_states_memberships
- Terminal state membership matrix.terminal_states_probabilities
- Aggregated probability of cells to be in terminal states.