cellrank icon indicating copy to clipboard operation
cellrank copied to clipboard

Change the way in which the `backward` mode works

Open Marius1311 opened this issue 2 years ago • 1 comments

At the moment, our estimators have a backward mode which is indented to study the dynamics of the "backward" Markov process. I would change the interpretation of this and unify our treatment of initial, intermediate, and terminal states:

  • the backward mode should not change the naming of any attribute or method, nor should it make any method available. Any estimator should have the same methods and attributes available, independent of its direction.
  • the backward characteristic of an estimator should thus only act as a description of the estimator; the user themselves should understand to interpret terminal states in the backward process as initial states of the forward process
  • initial and terminal states should be treated equally; every estimator should have equivalent methods available for their identification and visualization, e.g. compute_terminal_states and compute_initial_states, plot_terminal_states and plot_initial_states, etc. They should also be written to equivalent attributes in the estimator and in AnnData.
  • the predict() method should compute both initial and terminal states
  • we need to discuss the treatment of intermediate states - ideally, the predict() method would perform a full classification of states into either initial, terminal, or intermediate.

Marius1311 avatar Jun 24 '22 08:06 Marius1311

Changes:

  • introduce a method classify_states that controls which states are computed via a which parameter (default: terminal)
  • plotting: use the plot_macrostates method, introduce a which parameter (None by default)
  • For manual setting: set_states_from macrostates and set_states with which argument
  • The predict method is just an alias for classify_states (other way round)

Marius1311 avatar Jun 28 '22 06:06 Marius1311

Hi Mike, what's the state here - should I test this again?

Marius1311 avatar Oct 10 '22 08:10 Marius1311