lineage.states.StateDistributionGamma ===================================== .. py:module:: lineage.states.StateDistributionGamma .. autoapi-nested-parse:: This file is completely user defined. We have provided a general starting point for the user to use as an example. Classes ------- .. autoapisummary:: lineage.states.StateDistributionGamma.StateDistribution Functions --------- .. autoapisummary:: lineage.states.StateDistributionGamma.atonce_estimator Module Contents --------------- .. py:class:: StateDistribution(bern_p = 0.9, gamma_a = 7.0, gamma_scale = 4.5) StateDistribution for cells with gamma distributed times. .. py:attribute:: params .. py:method:: rvs(size, rng=None) User-defined way of calculating a random variable given the parameters of the state stored in their object. .. py:method:: dist(other) Calculate the Wasserstein distance between two gamma distributions that each correspond to a state. This is our way of calculating the distance between two state, when their bernoulli distribution is kept the same. For more information about wasserstein distance, please see https://en.wikipedia.org/wiki/Wasserstein_metric. .. py:method:: dof() Return the degrees of freedom. In this case, each state has 1 bernoulli distribution parameter, and 2 gamma distribution parameters. .. py:method:: logpdf(x) User-defined way of calculating the log likelihood of the observation stored in a cell. In the case of a univariate observation, the user still has to define how the likelihood is calculated, but has the ability to just return the output of a known scipy.stats..<{pdf,pmf}> function. In the case of a multivariate observation, the user has to decide how the likelihood is calculated. In our example, we assume the observation's are uncorrelated across the dimensions (across the different distribution observations), so the total log likelihood of observing the multivariate observation is just the sum of the individual observation log likelihoods. .. py:method:: estimator(x, gammas) User-defined way of estimating the parameters given a list of the tuples of observations from a group of cells. .. py:method:: censor_lineage_array(censor_condition, tree, obs, states, desired_experiment_time=2000000000000.0) Applies censoring to array representation directly. .. py:function:: atonce_estimator(all_tHMMobj, x_list, gammas_list, phase) Estimating the parameters for one state, in this case bernoulli nad gamma distirbution parameters, given a list of the tuples of observations from a group of cells. gammas_list is only for one state.