-
Notifications
You must be signed in to change notification settings - Fork 5
Manual
Welcome to the In-Cognitive wiki page!
To run the application, you first need to locally download the files straight from the repository and execute the main.py module. The In-Cognitive GUI provides all possible and necessary interactions with the back-end code. Communication between the back-end code and the GUI is deployed via the core Python dictionary, fcm_layout_dict
.
Figure 1. In-Cognitive application architecture
You can modify the tables in the Inputs panel. Alternatively, you may upload, on the upper right side of the GUI, a predefined Excel file (see example excel file format ). The Excel file allows you to insert the nodes along with their initial values, interconnections, weights, correlation lags, as well as specify whether they are input or output nodes. There are also some options for auto-weights (weights of each node for itself, to define the extent to which historic values are considered in the FCM analysis) and auto-lag (i.e., the time delay between the node's current and past value). Once you upload an input Excel file and/or modify the tables, the fcm_layout_dict
is updated automatically. Afterwards, the application provides a visual illustration of the input FCM layout in a circular layout (upper left side of the GUI, FCM illustration panel).
Ιn the MCFCM simulation parameters panel (lower left side of the GUI), you may choose if the input node values and/or weights are considered random (uncertain) variables. If so, you may specify the standard deviation—as well as whether zero weights should also be considered random variables, by ticking the variance of zero weights box. Next, you may choose the transfer function as well as (optionally) its parameter λ value. Finally, you may run the FCM simulation by clicking the "Execute simulation" button.
Τhe application is preconfigured in such a way that the transfer function’s parameter λ is optimised for all values to fall within the "almost-linear" region of the transfer function. Should you choose to manually insert the value of parameter λ, the application provides a warning in case the user-defined parameter λ yields node values outside the "almost-linear" region. The simulation may run in two modes: (i) naive FCM simulation, and (ii) Monte Carlo FCM (MCFCM) simulation. The latter is automatically activated if users select the Input nodes variation and/or weights variation box(es). Otherwise, the naive FCM simulation mode is activated.
This simulation mode is activated when weights and input node values are constant (i.e., not considered uncertain). The iterative FCM formula is executed until all nodes converge.
Should you select to have variable input node values and/or weights, the application runs in MCFCM mode, employing the Beta distribution:
-
- The procedure of Naive FCM simulation mode is executed N times.
-
- For each iteration, the input node values and/or the weights are sampled by the Beta distribution (the mean of each Beta distribution equals to the provided input node values or/and weights in the Inputs panel).
-
- The parameter N and the standard deviation of the Beta distribution can be specified via the corresponding boxes of the MCFCM simulation parameters panel.
After the simulation is completed (with or without an MC procedure), the application should inform you and yield a visualisation of the results in the "Results" panel. In the generated plots, the x-axis corresponds to node values and the y-axis to node names. The results of the naive FCM mode are demonstrated with red dots. If the MCFCM mode is selected, the plots also demonstrate the distribution of each node with a light blue colour on top of the red dots (see example visualisation in the figure below).
Figure 2. Illustrative example of the Results panel (MCFCM mode, with red dot corresponding to user-defined values and light blue distributions corresponding to the Monte Carlo runs)