Inference on mixtures
- class pyagrum.bnmixture.BNMixtureInference(bnm, engine=<class 'pyagrum.pyagrumcpp.LazyPropagation'>)
Class used for inference on BNMixtures.
- Parameters:
bnm (
BNM.BNMixture) – Model used.engine (
Optional) – Inference tool used to compute inference. You shuold give the class and not an initialized object. Example :engine=pyagrum.LazyPropagationis ok but not engine=pyagrum.LazyPropagation(bnm).
Scientific notes
BNMixtureInference runs the same inference (pyagrum.LazyPropagation by default), with the same evidence \(e\),
in every network of a pyagrum.bnmixture.BNMixture, and returns the posterior of the mixture distribution \(P\):
Each weight is multiplied by the probability that its network gives to the evidence, as in Bayesian model averaging
[1]: a network in which \(e\) is impossible does not count, and without evidence this is
the weighted mean of the posteriors. With evidence, the inference engine must compute \(P_i(e)\)
(pyagrum.LazyPropagation, pyagrum.ShaferShenoyInference).
Methods
Compute inference for all BNs in the model, excluding reference BN. |
|
Erases all the evidences and apply addEvidence(key,value) for every pairs in |
- class pyagrum.bnmixture.BootstrapMixtureInference(bnm, engine=<class 'pyagrum.pyagrumcpp.LazyPropagation'>)
Class used for inference on BootstrapMixture objects. The main difference with BNMixtureInference is that the returned posterior is not a mean of all posteriors in the BNs but only the one of the reference BN. The other BNs are used to estimate parameters such as max, min and quantile values.
- Parameters:
bnm (
BNM.BootstrapMixture) – Model used.engine (
Optional) – Inference tool used to compute inference. You shold give the class and not an initialized object. Example :engine=pyagrum.LazyPropagationis ok but not engine=pyagrum.LazyPropagation(bnm).
Scientific notes
BootstrapMixtureInference runs the same inference (pyagrum.LazyPropagation by default), with the same evidence, in
the reference network and in every network of a pyagrum.bnmixture.BootstrapMixture (networks learned from bootstrap
copies of the data [2]). It returns the posterior of the reference network only; the other
networks give, for each value of the variable, the weighted quantile interval defined in
pyagrum.bnmixture.BootstrapMixture (levels 0.2 and 0.8 by default).
Nir Friedman, Moises Goldszmidt, and Abraham Wyner. Data analysis with Bayesian networks: a bootstrap approach. In Proceedings of the Fifteenth Conference on Uncertainty in Artificial Intelligence (UAI 1999), 196–205. 1999. URL: https://arxiv.org/abs/1301.6695.
Methods
Compute inference for all BNs (including reference BN) in the model. |
|
Erases all the evidences and apply addEvidence(key,value) for every pairs in |
References of the members
Andrey Akinshin. Weighted quantile estimators. arXiv preprint arXiv:2304.07265, 2023. URL: https://arxiv.org/abs/2304.07265, doi:10.48550/arXiv.2304.07265.