.. index:: Experience Tables

.. _Experience_tables:

Experience Tables
=================

Each discrete or continuous chance node in a Bayesian network or a LIMID may be assigned a experience table. Experience tables play an important role in (batch) parameter estimation using the :ref:`EM Algorithm<EM_learning>` and sequential parameter update using :ref:`Adaptation<adaptation>`. Consider the Bayesian network shown in Figure 1. 

.. figure:: images/chestclinic.png

	Figure 1: Bayesian-network representation of "Chest Clinic".

Experience table(s) are required in the parameter estimation process as well as in the adaptation process (adaptation is not supported for continuous chance nodes though). To explain what happens when we start using experience tables, let's consider the "Smoker?" variable. To add an experience table to the variable, select the variable, do a right click and choose "Add Experience Table" in the "Experience/Fading Table Operations" submenu. To see the created experience table, first activate the Tables Pane by clicking the tables-pane button (as you probably did in the :ref:`How to Build BNs tutorial<HowToBuildABayesianNetwork>`), select the "Smoker?" node (if not already selected), select the "Show experience table" item of the View menu for the :ref:`node table<node_table_tutorial>` of "Smoker?". The node table for the "Smoker?" variable is shown in Figure 2.

.. figure:: images/nodetableexample.png

	Figure 2: Node table for the "Smoker?" discrete chance variable.

The count in the experience table represents the number of observations made so far on the "Smoker?" variable. The value of the experience count must be greater than 0 to activate adaptation whereas the experience table must exist to activate parameter estimation. It is possible to turn off parameter estimation for a specific parent configuration by specifying a negative experience count for that parent configuration. If we believe the correctness of the present conditional probability distribution or density is high, then the experience count must have a high value; otherwise, the value of the count should be low. In the present example we assume that our belief in the correctness of the current conditional distribution is low, thus we set the initial experience count to a small number, say 10. To modify the experience count, just click on count cell of the experience table in the Tables Pane and enter the value 10. This means that HUGIN assumes we have observed the value of the "Smoker?" variable 10 times so far.

You can change a specific numeric value by selecting it with the mouse cursor and typing in a new value from the keyboard.

Experience tables can be added to many variables at the same time. To add experience tables to all the chance variables click somewhere in the Network Pane, click the right mouse button and then choose the "Add Experience Table to All Chance Nodes" item of the "Experience/Fading Table Operations" submenu. To add experience tables to a subset of chance variables, select these nodes, right click, and select "Add Experience Table" in the "Experience/Fading Table Operations" submenu.