![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
The conjugate update for one observation of a given likelihood family against the running posterior (= prior) family. More...
#include "Distribution.h"
Public Attributes | |
| bool(* | update )(double &q1, double &q2, const DistributionTemplate &lik, double datum) |
Update the running posterior parameters q1 / q2 (a distribution of the prior's family) by one observation. | |
| double(* | log_predictive )(double q1, double q2, const DistributionTemplate &lik, double datum) |
Log predictive density \(\ln m(d \mid q_1, q_2)\) of the datum under the running posterior BEFORE the update; summed over the fold it is the exact log marginal likelihood behind provsql.evidence. | |
The conjugate update for one observation of a given likelihood family against the running posterior (= prior) family.
Both callbacks receive the observed leaf's parsed template lik (its non-wired slots carry the resolved literal parameters, e.g. the known σ of a normal(θ,σ) likelihood) and the observed datum.
Definition at line 551 of file Distribution.h.
| double(* provsql::ConjugateRule::log_predictive) (double q1, double q2, const DistributionTemplate &lik, double datum) |
Log predictive density \(\ln m(d \mid q_1, q_2)\) of the datum under the running posterior BEFORE the update; summed over the fold it is the exact log marginal likelihood behind provsql.evidence.
NaN (or a null pointer) = unavailable, so evidence() keeps its Monte Carlo path.
Definition at line 568 of file Distribution.h.
| bool(* provsql::ConjugateRule::update) (double &q1, double &q2, const DistributionTemplate &lik, double datum) |
Update the running posterior parameters q1 / q2 (a distribution of the prior's family) by one observation.
Returns false to decline (guard failure: an invalid literal slot, a datum outside the likelihood's support...), which declines the whole recognition.
Definition at line 559 of file Distribution.h.