27 January 2015

This example explains how a Bayesian Belief Network (BBN) is used to interpret sensor readings from a spectrometer.

Within the application a window with sequentially
changing colors is displayed in the lower left corner, see Figure 1. A spectrometer
hardware device with 3648 channels analyses the optical emission
within a range between 200nm and 1300 nm. This measured spectra is
shown in the main application window *Spectra*. As a further
processing step the spectra is weighted according to the sensitivity
functions of the human eye cones
http://en.wikipedia.org/wiki/Cone_cell. This
means that 3 values are calculated from the spectra representing the
excitation state of the color sensitive cells of the human eye (S-cone
(Small), M-cone (Medium) and L-cone (Large)). While the human brain
uses this information to identify the associated color, these triple
values are forwarded to the Bayesian Network via a WEB Service to do a
similar color detection job. In the sense of the Bayesian Network this
means to calculate the probabilities to be in one of 16 color
states. The returned probability values are finally shown on-line
within the application *Color recognition* to verify the
identification performance of the Bayesian Network.

Figure 2 below shows the structure of the BBN used
in the example to represent the uncertainty in the domain and to
support reasoning with uncertainty. The BBN has four variables where the
variable *Color* is discrete with one state for each possible color
while variables *S-cone*, *M-cone*, and *L-cone* are continuous
variables with a Gaussian distribution conditional on *Color*.

The parameters of the BBN have estimated from a
data sample. Figure 3 shows the prior distribution of each variable in
the BBN. Each continuous variable has a marginal distribution which is
a mixture of Gaussian distributions. The *Color* variable has an
(approximately) uniform distribution over the colors.

Figure 4 shows the posterior distribution of each
variable in the BBN given knowledget hat _S-cone_ has value
0.95. Under this observation the most likely state is *blue*
while *fuchsia* and *aqua* also have an increased posterior
probability under this evidence.

Below is a set of HUGIN widgets for interacting with the model (click on the probability bar to instantiate a node or remove evidence):

In the tree input fields below, then user can enter an observed numerical for the S-cone, M-cone, and L-cone. The values are used by the Bayesian Belief network to compute a probability distribution over the different colors represented in the model (right hand side).

S-cone | |

M-cone: | |

L-cone |

Enter a value

S-cone: |

M-cone: |

L-cone: |

S-cone: |

M-cone: |

L-cone: |

This is a video demonstrating the integration between the sensor and the BBN module. The BBN module is implemented as a remote web service.

For further details contact:

on BBNs: Anders L Madsen at anders-at-hugin-dot-com

on Spectrometer: Knut Voigtlaender at voigtlaender-at-adp-hyphen-dresden-dot-de

Kjærulff, U.B and Madsen, A.L. (2013): Bayesian Networks and Influence Diagrams: A Guide to Construction and Analysis. Second Edition. Springer.