revrand.likelihoods.Bernoulli

class revrand.likelihoods.Bernoulli

Bernoulli likelihood class for (binary) classification tasks.

A logistic transformation function is used to map the latent function from the GLM prior into a probability.

\[p(y_i | f_i) = \sigma(f_i) ^ {y_i} (1 - \sigma(f_i))^{1 - y_i}\]

where \(y_i\) is a target, \(f_i\) the value of the latent function corresponding to the target, and \(\sigma(\cdot)\) is the logistic sigmoid.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

Ey(f) Expected value of the Bernoulli likelihood.
__init__ Initialize self.
cdf(y, f) Cumulative density function of the likelihood.
df(y, f) Derivative of Bernoulli log likelihood w.r.t. f.
dp(y, f, *args) Derivative of Bernoulli log likelihood w.r.t.the parameters, \(\theta\).
loglike(y, f) Bernoulli log likelihood.

Attributes

params Get this object’s Parameter types.