Skip to Content

Example 2

Example 2a: Fully observed particle

For this example, we use a simple network consisting of the Parent Node Sex\mathit{Sex} and the Child Node Treatment\mathit{Treatment}, which have a probabilistic relationship. For Parameter Updating, we will add a fully observed particle, i.e., a particle that contains a value for both Sex\mathit{Sex} and Treatment\mathit{Treatment}. For a compact presentation, we show both nodes in Monitor Style, which means that, in Validation Mode, the distribution of the states is directly shown on the node.

Loading SVG...

To start Parameter Updating, select Menus > Inference > Parameter Updating. Choose Manual Evidence. If the dialog offers a node selection, select All Nodes. Set Initialize Prior Weights to to 100 and Initialize Discounts to to 1.

Parameter Updating with all nodes initialized to prior weight 100 and discount 1

Choosing an overall Prior Weight of 100 specifies a Prior Weight of 100 for Sex\mathit{Sex}, and spreads this weight to Treatment\mathit{Treatment}, i.e., the Prior Weights are allocated based on the joint probability of each condition. We can review the Prior Weights of each node by opening the Node Editor.

Sex — initial weights
Loading SVG...
Treatment — initial weights
Loading SVG...

In the Node Editor, Prior Weights can also be edited. Alternatively, you can assign Prior Weights by selecting Node Contextual Menu > Properties > Prior Weights. In that case, the Prior Weight is distributed uniformly across all conditions. In the Node Editor, you can also edit Discounts. You can also assign Discounts for a node by selecting Node Contextual Menu > Properties > Discounts. In this context, the same Discounts are applied to all conditions.

Adding particles

We now take this network and perform Parameter Updating by adding particles one-by-one. The toolbar initially shows zero learned particles.

Parameter Updating controls before the first particle

Particle #1

For the first particle, we set the evidence that Sex\mathit{Sex} is Male\mathrm{Male} and Treatment\mathit{Treatment} is False\mathrm{False}.

Loading SVG...

Click Learn Evidence once. The counter advances to 1 and Validate Updating becomes available.

Parameter Updating toolbar with one learned particle and validation enabled

Click Validate Updating and confirm. Switch to Modeling Mode and open the Node Editor for each node. Tabular shows the updated probabilities, and Updating shows the corresponding prior weights and discounts.

Sex — probabilities (%)
Loading SVG...
Sex — updating weights
Loading SVG...
Treatment — probabilities (%)
Loading SVG...
Treatment — updating weights
Loading SVG...

Note that for the Treatment\mathit{Treatment} node, only the Male\mathrm{Male} condition was updated. The probabilities and the Prior Weight for Female\mathrm{Female} remain unchanged. Below is the result of the update after mixing our virtual particles with a particle corresponding to a male that did not take the treatment.

Loading SVG...

Example 2b: Partially observed particle

In the following variation of the above example, we return to the original set of probabilities and a Prior Weight of 100.

Loading SVG...

Observe True\mathrm{True} for Treatment\mathit{Treatment} and leave Sex\mathit{Sex} unobserved. The model assigns posterior probabilities of 75% to Male\mathrm{Male} and 25% to Female\mathrm{Female}.

Loading SVG...

Upon validating this incomplete particle, we can review the probability tables in the Node Editor:

Treatment — probabilities (%)
Loading SVG...
Treatment — updating weights
Loading SVG...

As we can see, even though we do not know the state of the node Sex\mathit{Sex}, knowing that Treatment\mathit{Treatment} is True\mathrm{True} changed the distribution of Sex\mathit{Sex}. The new particle contributes 0.75 to the Male\mathrm{Male} row and 0.25 to the Female\mathrm{Female} row. Note that the distribution of the node Sex\mathit{Sex} has been updated as well:

Sex — probabilities (%)
Loading SVG...
Sex — updating weights
Loading SVG...

Example 2c: Partially observed particle with Soft Evidence

Start again with the original probabilities and a prior weight of 100. In this variation, we apply a partial observation with Soft Evidence. For example, we just see a pill box next to the person, which increases our belief that he/she has taken the treatment, say 75%.

Loading SVG...

The posterior probability of Male\mathrm{Male} becomes 62.5%, and that of Female\mathrm{Female} becomes 37.5%. The new particle will thus be split to take into account the uncertainty on both Sex\mathit{Sex} and Treatment\mathit{Treatment}.

Below is the result of the update after mixing our virtual particles with this particle. The entire table of Treatment\mathit{Treatment} has been updated.

Sex — probabilities (%)
Loading SVG...
Sex — updating weights
Loading SVG...
Treatment — probabilities (%)
Loading SVG...
Treatment — updating weights
Loading SVG...

Setting the Prior Weight to 0 allows indicating that you do not want to update the corresponding node.

Obviously, you need to have at least one node that has a Prior Weight greater than 0 for being able to use the Parameter Updating feature.