EXACT INFERENCE IN BAYESIAN NETWORKS
Version 1.0.3 (4.54 KB) by
Chixin Xiao
This is an exact inference illustration in Bayesian Networks based on the example given in Figure 14.1, pp511, in [1].
% To help my students (Mathematical Department) make sense of Probabilistic Reasoning in my AI class at Xiangtan University, I thereby write down this code segment, hoping to be helpful.
This is an exact inference illustration in Bayesian Networks based on the example given in Figure 14.1, pp511, in [1].
This problem is structured using a Bayesian Network, where each node represents a variable, and edges represent conditional dependencies. The key variables are:
- Burglary (B) → Whether a burglary has occurred.
- Earthquake (E) → Whether an earthquake has occurred.
- Alarm (A) → The alarm goes off, which could be triggered by either a burglary or an earthquake.
- JohnCalls (J) → John calls if he hears the alarm.
- MaryCalls (M) → Mary calls if she hears the alarm.
B E
\ /
A
/ \
J M
As mentioned in Chapter 14, the basic task for any probabilistic inference system is to compute the posterior probability distribution for a set of query variables, given some observed event—that is, some assignment of values to a set of evidence variables.
The first edition is finished by Chixin Xiao, on 16 Feb 2025, 02:45 am, in Changsha, China.
Email: chixinxiao@gmail.com
[1] "Artificial Intelligence: A Modern Approach, 3rd US ed." Accessed: Dec. 28, 2023. [Online]. Available: http://aima.cs.berkeley.edu/
Cite As
Chixin Xiao (2026). EXACT INFERENCE IN BAYESIAN NETWORKS (https://in.mathworks.com/matlabcentral/fileexchange/180157-exact-inference-in-bayesian-networks), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2024b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
