bbn.visualise()
visualises the outcomes of a Bayesian Belief Network (BBN
) model over time,
given a single prior
scenario. It highlights the changes in network parameters across specified timesteps
and visualises the strength and direction of interactions among nodes
based on the specified disturbance
and threshold
parameters.
bbn.visualise(
bbn.model,
priors1,
timesteps = 5,
disturbance = 1,
threshold = 0.2,
font.size = 0.7,
arrow.size = 4
)
A plot of the BBN
, illustrating the dynamic interactions between nodes
over the specified timesteps
.
A matrix or dataframe of interactions between different model nodes
.
An X by 2 array of initial changes to the system under investigation.
The first column should be a -4 to 4 (including 0) integer value for each node
in the network with negative values
indicating a decrease and positive values representing an increase. 0 represents no change.
This is the number of timesteps
the model performs. Default = 5.
Note, timesteps
are arbitrary and non-linear. However, something occurring in timestep 2
, should occur before timestep 3
.
Default = 1.
1 creates a prolonged or press disturbance
as per bbn.predict
Essentially prior
values for each manipulated node
are at least maintained (if not increased through reinforcement in the model) over all timesteps
.
2 shows a brief pulse disturbance
, which can be useful to visualise changes as peaks and troughs in increase and decrease of nodes
can propagate through the network.
Nodes
which deviate from 0 by more than this threshold
value will display interactions with other nodes
.
Default = 0.2.
Values in these visualisation functions don’t directly correspond to those in bbn.predict
.
This value can be tweaked from 0 to 4 to create the most useful visualisations.
Changes the font in the figure produced. Default = 0.7.
The value here is a multiplier of the default font size used in the igraph
package and does not correspond to the font.size
argument in the bbn.timeseries
.
Changes the size of the arrows. Default = 4. Note, sizes do vary based on interaction strength, so this is a multiplier for visualisation purposes.
data(my_BBN, combined)
bbn.visualise(bbn.model = my_BBN, priors1 = combined,
timesteps=6, disturbance=1, threshold=0.2, font.size=0.7, arrow.size=4)
Run the code above in your browser using DataLab