BernoulliProdLik¶
- class glimix_core.lik.BernoulliProdLik(link=None)[source]¶
Product of Bernoulli likelihoods.
The product can be written as
\[\prod_i p_i^{y_i} (1-p_i)^{1-y_i}\]where \(p_i\) is the probability of success.
- Parameters
link (link_func) – Link function establishing \(g(p_i) = x_i\). Defaults to
None
, which leads to theglimix_core.link.LogitLink
link function.
Methods
__init__
([link])Initialize self.
mean
(x)Outcome mean.
sample
(x[, random_state])Sample from the likelihood distribution.
Attributes
name
Get the name of this likelihood.
outcome
Get or set an array of outcomes.
sample_size
Get the number of samples.