_ZINBEstimator.py module
- class wrappers._ZINBEstimator.ZINBEstimator(initial_pi_values=[1e-05, 0.0001, 0.001, 0.005, 0.01, 0.1, 0.5, 0.9])
Bases:
object
A class for estimating the parameters of a Zero-Inflated Negative Binomial (ZINB) distribution from count data.
- Parameters:
initial_pi_values (list, optional) -- Initial values of pi to perform a grid search to find the optimal 'pi' parameter.
- compute_zinb_params(counts)
Estimates the Zero-Inflated Negative Binomial (ZINB) parameters and AIC from a given set of count data.
- Parameters:
counts (numpy.ndarray) -- A set of counts to estimate ZINB parameters from.
- Returns:
A tuple containing the estimated parameters (mu, theta, pi, aic) where:
mu: The mean of the Negative Binomial component.
theta: The dispersion parameter of the Negative Binomial component.
pi: The zero-inflation parameter.
aic: The Akaike Information Criterion value for the fit.
- Return type:
tuple
- Usage:
zinb_estimator = ZINBEstimator() mu, theta, pi, aic = zinb_estimator.compute_zinb_params(counts)