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.LogitLinklink function.
Methods
__init__([link])Initialize self.
mean(x)Outcome mean.
sample(x[, random_state])Sample from the likelihood distribution.
Attributes
nameGet the name of this likelihood.
outcomeGet or set an array of outcomes.
sample_sizeGet the number of samples.