Cluster Interpretation: MAP
t's suppose we want to find out what are the triplets of traits that Maximize the A Posteriori given C3. We do not have (yet) a MAP function implemented in BayesiaLab, but we can easily augment our Bayesian network with Function Nodes (opens in a new tab) and use our Genetic Function Optimization (opens in a new tab) tool to find our triplets (Analysis | Function Optimization | Genetic).

- #Obs: the number of Hard Evidence set in the network. We can get this number with the Inference Function ObsCount(True, false, false, false),
- #ObsMin: the minimum number of Hard Evidence that we set to 4 to search for triplets (i.e. C3 plus the triplets),
- Joint: the joint probability of the current set of evidence. It is returned by the Inference Function JointProb(),
- MAP: the score we want to maximize, defined with the equation if(?#Obs? < ?#ObsMin?, 0, ?Joint?).

We did not set here any Stop Criterion. This means that we will need to stop the genetic algorithm by clicking in the lower-left corner of the graph window.

The current Best Score is shown at the end of the Progress Bar. You can also see which Generation found this score.
You can also see at the lower right corner of the Graph Panel the icon blinking. This indicates that there are some outputs in the Console (opens in a new tab). Clicking on this icon will open the Console:

While the first column indicates the Generation, the following columns return the score of the current best individual in each Kingdom. When a score is framed with "***", it indicates that there has been an improvement in this Generation

If you want to find out the MAP on a specific subset of nodes, you just have to set #ObsMin to 0, and either select the nodes before running the optimization with "Restrict Search to the Selected Nodes", or set all other nodes as Not Observable.
Here is an image that represents the profile of the men who belong to C3 on the basis of all these analyses:
