lppl  v2.0.0

◆ loglikelihood() [3/3]

template<typename... Ts>
double loglikelihood ( record_t< DTypes< Ts... >> &  record,
std::function< double(std::string &, double)> &&  scale 
)

Computes the scaled cumulative log-likelihood of the record on a per-address basis, \( \sum_{a\ observed} \beta(a, \log p(r(a))) \).

Template Parameters
TsThe types of the distributions in the program
Parameters
recordthe record for which to compute the log likelihood
scale\( \beta:\ string \rightarrow double \rightarrow double \) scales the likelihood values
Returns
double