.. index:: Case Generator Tutorial

.. _Case_Generator_Tutorial:

Case Generator Tutorial
=======================

To generate (simulated) cases based on the current conditional probability distributions (CPTs) select the Generate Cases item in the File menu as shown in figure 1. 

.. figure:: images/casegeneratorbutton_full.png

	Figure 1: The Case Generator Button.

By default, the HUGIN Graphical User Interface chooses to create 10,000 cases with 5 percent missing values. The user can change these values. To generate the cases one of the algorithm: MCAR or MAR must be selected. Figure 2 shows the Case Generator Window. 
 
.. figure:: images/CaseGeneratorWindow.png

	Figure 2: The Case Generator Window.

Now, the HUGIN Graphical User Interface will generate a set of cases and, if the user has chosen to do so, store them in a plain text file. Figure 3 shows the content of such a file where the cases are generated based on the :download:`Chest Clinic<ChestClinic.net>` network.

.. figure:: images/asia_dat.png
	:width: 300

	Figure 3: The Content of a Case File.
