bayesia logo
BayesiaLab
Associate Dictionary

Associate Dictionary

Context

  • This menu item allows you to define the properties of the active Bayesian network using text files.
  • These properties concern arcs, nodes and states:

Dictionary File Structures

Dictionary File Structures
ArcArcsName of the arc’s starting node or class, -> , <- or even -- to indicate the both possible orientations, name of the arc’s ending node or class, Equal, Space or Tab , true for an added arc or false for a removed arc. The last occurrence is always chosen.
Forbidden ArcsName of the arc’s starting node or class, -> , <- or even -- to indicate the both possible orientations, name of the arc’s ending node or class.
CommentsName of the arc’s starting node or class, -> , <- or even -- to indicate the both possible orientations, name of the arc’s ending node or class, Equal, Space or Tab , comment . The comment can be any character string without return (in html or not). The last occurrence is always chosen.
ColorsName of the arc’s starting node or class, -> , <- or even -- to indicate the both possible orientations, name of the arc’s ending node or class, Equal, Space or Tab , color . The color is defined as Red Green Blue 8 bits by channel color written in hexadecimal (web format). For example green gives 00FF00, yellow gives FFFF00, blue gives 0000FF, pink gives FFC0FF, etc. The last occurrence is always chosen.
Fixed ArcsName of the arc’s starting node or class, -> , <- or even -- to indicate the both possible orientations, name of the arc’s ending node or class, Equal, Space or Tab , true for an fixed arc or false for a not fixed arc. The last occurrence is always chosen.
NodeNode RenamingName of the node Equal, Space or Tab new node name. The new name must be valid (different from t or T and without?). A node can be present only once otherwise the last occurrence is chosen.
CommentsName of the node or the class Equal, Space or Tab Comment. The comment can be any character string without return (in html or not). A node can be present only once otherwise the last occurrence is chosen.
ClassesName of the node Equal, Space or Tab Name of the class. The class can be any character string. A node present several times will be associated with different classes.
ColorsName of a node or a class Equal, Space or Tab Color. The color is defined as Red Green Blue 8 bits by channel color written in hexadecimal (web format). For example green gives 00FF00, yellow gives FFFF00, blue gives 0000FF, pink gives FFC0FF, etc. A node can be present only once otherwise the last occurrence is chosen.
ImagesName of a node or a class Equal, Space or Tab path to the image relatively to the directory where the dictionary is. The image path must be a valid relative path or an empty string. A node can be present only once otherwise the last occurrence is chosen.
CostsName of the node Equal, Space or Tab value of the cost or empty if we want the node to be not observable. The cost is an empty string or a real number superior or equal to 1. A node can be present only once otherwise the last occurrence is chosen.
Temporal IndicesName of the node Equal, Space or Tab value of the index or empty if we want to delete an already existent index. The index is an integer. A node can be present only once otherwise the last occurrence is chosen.
Local Structural CoefficientsName of the node Equal, Space or Tab value of the local structural coefficient or empty if we want to reset to the default value 1. The local structural coefficient is an empty string or a real number superior to 0. A node can be present only once otherwise the last occurrence is chosen.
State Virtual NumbersName of the node Equal, Space or Tab virtual number of states or empty if we want to delete an already existent number. The state virtual number is an empty string or an integer superior or equal to 2. A node can be present only once otherwise the last occurrence is chosen.
LocationsName of the node Equal, Space or Tab , position. The location is represented by two real numbers separated by a Space. The first number represent the x-coordinate of the node and the second number the y-coordinate. A node can be present only once otherwise the last occurrence is chosen.
StateState RenamingName of the node or class dot (.) name of the state Equal, Space or Tab new state name or State name Equal, Space or Tab new state name if we want to rename the state for all nodes. The new name is a valid state name. A state can be present only once otherwise the last occurrence is chosen.
State ValuesName of the node or class dot (.) name of the state Space or Tab real value or Name of the state Equal, Space or Tab real value if we want to associate a value with a state whatever the node. The value is a real number. A state can be present only once otherwise the last occurrence is chosen.
State Long NamesName of the node or class dot (.) name of the state Equal, Space or Tab long name or Name of the state Equal, Space or Tab long name if we want to associate a long name with a state whatever the node. The long name is a string. A state can be present only once otherwise the last occurrence is chosen.
Filtered StatesName of the node or class dot (.) name of the filtered state. Name of the filtered state if we want to set the filter property to the state whatever the node. A state can be present only once otherwise the last occurrence is chosen.

As indicated by the syntax, the name of the node, class or state in the text file cannot contain equal, space or tab characters. If the node names contain such characters in the networks, those characters must be written with a \ (backslash) character before in the text file: for example the node named Visit Asia will be written Visit\ Asia in the file.

In order to specifically differentiate a name which is the same for a class, a node or a state, you must add at the end of the name the suffix “c” for a class, “n” for a node and “s” for a state.

If your network contains not-ASCII characters, you must save your own dictionaries with UTF-8 (Unicode) encoding. For example, in MS Excel, choose “save as” and select “Text Unicode (*.txt)” as type of file. In Notepad, choose “save as” and select “UTF-8” as encoding. If your file contains only ASCII character you can let the default encoding (depending on the platform) but it is strongly encouraged to use UTF-8 (Unicode) encoding in order to create dictionary files that doesn’t depend on the user’s platform. So, for example, a Chinese dictionary can be read by a German without any problem whatever the used platforms are. If you are not sure how to save a file with UTF-8 encoding, you should export a dictionary with BayesiaLab, modify and save it (with any text editor) and load it in BayesiaLab.

Export Dictionary

This menu item allows exporting the different kinds of dictionaries in text files.

The dictionary files are saved with UTF-8 (Unicode) encoding in order to support any character of any language. An option, in the Import and Associate preferences: Save Format, allows saving or not the BOM (Byte Order Mask) at the beginning of the file. The BOM increases the compatibility with Microsoft applications. On other platform like Unix, Linux or Mac OS X, the BOM is not necessary and, in come cases, is considered as simple extra characters at the beginning of the file.

Associate an Evidence Scenario File

This menu item allows associating an evidence scenario file with the network.

Export an Evidence Scenario File

This menu item allows exporting into a text file an evidence scenario file associated with the network.

Generate Data

This menu item allows generating a base of n cases in agreement with the probability law described by the active Bayesian network. It is possible to choose to generate the data as an internal database. We can also indicate the rate of missing values of the base and use the long name of the states if the database is written in a file. It is possible to generate a database with test examples by indicating the wanted percentage.

The states’ long name can be saved instead of the states’ name. If the user wants to save the continuous values, the numerical values will be created by randomly generating a value in each concerned interval. If the data are generated in validation mode, then the evidences are taken into account.

Save Data

This menu item allows saving the base associated with the network including the results of the various pre-processing that have been carried out within the Data Importation Wizard. If the imported database still contains missing values and if the selected algorithm to process the missing values is one of the two imputation algorithms (static or dynamic), then option will allow you to realize all your imputation tasks by saving a database without any missing values. Indeed, each missing value is replaced by taking into account its conditional probability distribution, returned by the Bayesian network, given all the known values of the line. If the database contains data for test and data for learning, the user can choose which kind of data he wants to save: only learning data, only test data or the whole data. It is also possible to save only the data corresponding to the selected nodes.

The states’ long name can be saved instead of the states’ name. The numerical values in the database associated with the continuous nodes can be saved if they exist. If there is no numerical values associated with the database and if the option is checked, the numerical values will be created by randomly generating a value in each concerned interval. If the database contains weights, they will be saved as the first column in the output file.

Imputation

Allows the imputation of the missing values of the associated database according to the mode selected in the following dialog box:

The data will be saved in the specified file and the long name of the states will be used as specified. If the database contains data for test and data for learning, the user can choose on which kind of data he wants to perform imputation: only learning data, only test data or the whole data. The states’ long name can be saved instead of the states’ name. The numerical values in the database associated with the continuous nodes can be saved if they exist. If there is no numerical values associated with the database and if the option is checked, the numerical values will be created by randomly generating a value in each concerned interval. However, if there are numerical values in the database, the missing numerical values will be generated from the distribution function of each interval. If the database contains weights, they will be saved as the first column in the output file.


Copyright © 2025 Bayesia S.A.S., Bayesia USA, LLC, and Bayesia Singapore Pte. Ltd. All Rights Reserved.