lib5c.algorithms.variance.lognorm_dispersion module¶
Module for estimating lognormal dispersion parameters for 5C interaction data.
-
lib5c.algorithms.variance.lognorm_dispersion.
dispersion_to_variance
(disp, exp)[source]¶ Converts a dispersion estimate to a variance by applying it to the expected value of unlogged counts.
- Parameters
disp (float or np.ndarray) – The dispersion (variance of logged values).
exp (float or np.ndarray) – The expected value (of unlogged values).
- Returns
The variance.
- Return type
float or np.ndarray
-
lib5c.algorithms.variance.lognorm_dispersion.
dispersion_to_variance_direct
(disp, mu)[source]¶ Converts a dispersion estimate to a variance by applying it to the expected value of logged counts.
- Parameters
disp (float or np.ndarray) – The dispersion (variance of logged values).
mu (float or np.ndarray) – The expected value (of logged values).
- Returns
The variance.
- Return type
float or np.ndarray
-
lib5c.algorithms.variance.lognorm_dispersion.
variance_to_dispersion
(var, exp)[source]¶ Converts a variance estimate to a dispersion by applying it to the expected value of unlogged counts.
- Parameters
var (float or np.ndarray) – The variance (of unlogged values).
exp (float or np.ndarray) – The expected value (of unlogged values).
- Returns
The dispersion (variance of logged values).
- Return type
float or np.ndarray