lineage.HMM.M_step
Functions
|
Sum of the gammas of the cells that are able to divide, that is, |
|
Sum of the list of all the zeta parent child for all the parent cells for a given state transition pair. |
Module Contents
- lineage.HMM.M_step.sum_nonleaf_gammas(leaves_idx, gammas)
Sum of the gammas of the cells that are able to divide, that is, sum the of the gammas of all the nonleaf cells. It is used in estimating the transition probability matrix. This is an inner component in calculating the overall transition probability matrix.
This is downward recursion.
- Parameters:
leaves_idx -- leaf cell indices of the lineage tree
gammas (numpy.typing.NDArray[numpy.float64]) -- the gamma values for each lineage
- Returns:
the sum of gamma values for each state for non-leaf cells.
- Return type:
numpy.typing.NDArray[numpy.float64]
- lineage.HMM.M_step.get_all_zetas(tree, beta_array, MSD_array, gammas, T)
Sum of the list of all the zeta parent child for all the parent cells for a given state transition pair. This is an inner component in calculating the overall transition probability matrix.
- Parameters:
tree (scipy.sparse.csr_array) -- CSR array representing the lineage tree
beta_array (numpy.typing.NDArray[numpy.float64]) -- beta values. The conditional probability of states, given observations of the sub-tree rooted in cell_n
MSD_array (numpy.typing.NDArray[numpy.float64]) -- marginal state distribution
gammas (numpy.typing.NDArray[numpy.float64]) -- gamma values. The conditional probability of states, given the observation of the whole tree
T (numpy.typing.NDArray[numpy.float64]) -- transition probability matrix
- Returns:
numerator for calculating the transition probabilities
- Return type:
numpy.typing.NDArray[numpy.float64]