Discrete Nodes
Context
On the Graph Panel, a Discrete node appears as a solid blue disc with a solid outline by default: . Discrete Nodes represent categorical variables that can be symbolic or numerical. More specifically, there are three specific kinds of Discrete Nodes.
Discrete nodes with symbolic values
Examples include the Boolean state set and categorical state sets such as and .

Discrete nodes with integer values
An example set of integer values is .

Discrete nodes with real values
An example set of real values is .

Usage
Add Before/Add After
The Add Before and Add After buttons become available once you have selected any of the listed states. Clicking Add Before creates a new state before (i.e., above) the currently selected position on the list, while Add After produces a new state after (i.e., below) the selected position. The new states are automatically labeled , , , etc., regardless of the names of the existing states. By clicking into the list of states, you can overwrite existing or new state names.
Delete
To delete a state, select it in the list and click the Delete button. Note that you can only delete one state at a time.
Up/Down
Clicking the Up and Down buttons moves the position of the state you have selected in the list. This is useful for rearranging states with symbolic values so that they appear according to the natural order, such as , , and .
Generate Names
Clicking on the Generate Names button renames all the existing States with the default names , , , etc.
Generate States
The Generate States function is very practical in the context of building new networks from scratch. You can specify the number of new states to be generated, and then choose the naming convention or the numerical properties:
- Automatic Naming produces states with the automatically generated names, , , , etc.
- Numbered Names Prefixed by generates new states with names based on the string you specify followed by 0, 1, 2, etc.
- Integers Starting at creates a series of states with integer values beginning with the specified value and increasing with the specified increments (must be integers of 1 or higher).
- Reals Starting at produces a series of states beginning with the specified value and increasing with the specified real values (must be greater than 0).
Example & workflow illustration
The following animation shows Generate Names and Generate States in practice.
Aggregates & Generate Aggregations
Aggregation refers to the grouping of multiple states into a single state. This can be done as part of the Data Import process, or with this function at any time later.
This function is useful when dealing with a large number of discrete states in a node that would make it difficult to machine-learn relationships with that node.
The list of the aggregated states is used during Data Association for automatically associating these states with the defined state.
Manual aggregation
Click on Generate Aggregations, which opens up the Aggregation Generator window. From the list of states on the left, select the states you wish to aggregate using Shift+click or use Ctrl+click (Windows) or Cmd+click (macOS). The newly-formed, aggregated state appears in the right list. By default, the original state names are concatenated using the “+” symbol as a delimiter, with an underscore “_” added as a prefix.
Example & workflow illustration
In the following animation, we take the node , which includes U.S. postal abbreviations as Node States, and aggregate the states , , , , , and into a new state named .
Correlation-aided aggregation
In addition to the manual aggregation described above, BayesiaLab can support you in making the aggregation decisions. For this purpose, BayesiaLab can show how the original states of the to-be-aggregated node correlate with the states of other nodes on the Graph Panel.
Example & workflow illustration
For illustration purposes, we use demographic data with 72,761 cases covering the 50 U.S. states and the District of Columbia. Let’s say we are developing public health policies for poor communities, and we know that roughly 2% of Americans live in Census tracts that meet the so-called poverty criterion. In this context, we’d like to reduce our original list of states and group them into three bins (or buckets) of states that have either no, some, or many poor communities. So, we need to group the 51 categories into three sets.
Note that this is not the primary research objective. Rather, by creating this aggregation we want to facilitate a big-picture discussion about “rich states versus poor states” instead of looking at each state individually. Hence, we perform this aggregation before learning any network structure. So, the starting point is an unconnected network as shown in the screenshot below.

Example & workflow illustration
- In Modeling Mode
F4, open the Node Editor for the node . - Click the Generate Aggregations button.
- Click Show Correlations.
- Select under Target and under State.
- Review the Correlation column.
- Manually select States to aggregate or click Automatic Aggregation.
- Click Generate Aggregates.
- Set the number of States and click OK to confirm.
- Review the new aggregated states and, if necessary, assign new names to replace the ones that were generated automatically.
- Click OK to confirm.
- Rearrange the order of States in the Node Editor, if appropriate.
- Click OK to confirm.
Note that this type of aggregation cannot be reversed. All the original, underlying states are now merged into new states, and you won’t be able to undo this action.