cellrank.tl.estimators.GPCCA.compute_terminal_states

GPCCA.compute_terminal_states(method='stability', n_cells=30, alpha=1, stability_threshold=0.96, n_states=None)[source]

Automatically select terminal states from macrostates.

Parameters
  • method (str) –

    One of following:

    • ’eigengap’ - select the number of states based on the eigengap of the transition matrix.

    • ’eigengap_coarse’ - select the number of states based on the eigengap of the diagonal of the coarse-grained transition matrix.

    • ’top_n’ - select top n_states based on the probability of the diagonal of the coarse-grained transition matrix.

    • ’stability’ - select states which have a stability index >= stability_threshold. The stability index is given by the diagonal elements of the coarse-grained transition matrix.

  • 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. Used when method='eigengap' or method='eigengap_coarse'.

  • stability_threshold (float) – Threshold used when method='stability'.

  • n_states (Optional[int]) – Numer of states used when method='top_n'.

Returns

Nothing, just updates the following fields:

Return type

None