scipy.maxentropy.bigmodel.logpdf

bigmodel.logpdf(fx, log_prior_x=None)

Returns the log of the estimated density p(x) = p_theta(x) at the point x. If log_prior_x is None, this is defined as:

log p(x) = theta.f(x) - log Z

where f(x) is given by the (m x 1) array fx.

If, instead, fx is a 2-d (m x n) array, this function interprets each of its rows j=0,...,n-1 as a feature vector f(x_j), and returns an array containing the log pdf value of each point x_j under the current model.

log Z is estimated using the sample provided with setsampleFgen().

The optional argument log_prior_x is the log of the prior density p_0 at the point x (or at each point x_j if fx is 2-dimensional). The log pdf of the model is then defined as

log p(x) = log p0(x) + theta.f(x) - log Z

and p then represents the model of minimum KL divergence D(p||p0) instead of maximum entropy.