Simulated example: characteristics measured at baseline and an outcome at follow-up. Replace this text with one or two sentences on your study: the population, the follow-up, the measures. It appears in the report.
Created 02 December 2026, 13:00 with layerbn 3.0.1.
800participants
8variables
4layers
2network(s)
11arcs in "all_variables"
8arcs in at least 80% of resamples ("all_variables")
Notes on this run
Younger, low exposure: placed in bins: Age (years): 50 -> < 53.1; Exposure A (score): 30 -> < 35.2
Older, high exposure: placed in bins: Age (years): 70 -> ≥ 66.8; Exposure A (score): 60 -> ≥ 52.3
sweep: placed in bins: Age (years): 60 -> 59.5 to < 66.8
Design
Variables are grouped in layers. The order of the layers is the assumed order of influence. Arcs may only run from a layer to itself or to a later layer. Read the figure from the top down: the first layer is the top row. A layer's colour shows its place in the order, from blue (first) to red (last). A target variable has a solid title strip.
Variable table
Order
Layer
Time point
Variable
Column
Target
Missing values
1
Background
Age (years)
AGE
1
Background
Sex
SEX
2
Exposures
Exposure A (score)
EXPOSURE_A
2
Exposures
Exposure B
EXPOSURE_B
3
Baseline measures
Measure 1
MEASURE_1
3
Baseline measures
Measure 2
MEASURE_2
3
Baseline measures
Measure 3
MEASURE_3
4
Outcome
Outcome at follow-up
OUTCOME
yes
Data and bins
The network works on discrete variables, so continuous variables are cut into bins. All results depend on these bins. Check that the bin edges (black lines) are sensible, that no bin holds very few participants, and that variables that should have been kept as categories were not binned.
Arc darkness and the percentage show how often the arc appears when the network is learned again on resampled data (arc stability). Arc width is the mutual information between the two variables. A wide, light arc is informative but unstable. A dashed arc occurred in fewer than half of the resamples. There is no fixed threshold for a stable arc: report the frequency.
Arc stability
In network says whether the arc is in the single network learned from all data. This is a different question from stability, and the two can disagree in both directions.
All arcs (table)
Parent
Child
Parent layer
Child layer
Frequency
In network
Mutual information (bits)
Sex
Exposure A (score)
Background
Exposures
100%
yes
0.088
Exposure B
Outcome at follow-up
Exposures
Outcome
100%
yes
0.130
Age (years)
Measure 1
Background
Baseline measures
100%
yes
0.357
Age (years)
Exposure A (score)
Background
Exposures
100%
yes
0.173
Measure 3
Outcome at follow-up
Baseline measures
Outcome
100%
yes
0.313
Age (years)
Exposure B
Background
Exposures
100%
yes
0.088
Exposure B
Measure 2
Exposures
Baseline measures
100%
yes
0.293
Exposure A (score)
Measure 2
Exposures
Baseline measures
94%
yes
0.286
Measure 2
Measure 3
Baseline measures
Baseline measures
78%
yes
0.462
Exposure A (score)
Measure 1
Exposures
Baseline measures
74%
yes
0.354
Measure 1
Measure 3
Baseline measures
Baseline measures
73%
yes
0.428
Exposure A (score)
Measure 3
Exposures
Baseline measures
63%
no
Exposure B
Measure 3
Exposures
Baseline measures
43%
no
Age (years)
Outcome at follow-up
Background
Outcome
36%
no
Measure 1
Outcome at follow-up
Baseline measures
Outcome
34%
no
Measure 3
Measure 1
Baseline measures
Baseline measures
27%
no
Measure 3
Measure 2
Baseline measures
Baseline measures
22%
no
Age (years)
Measure 3
Background
Baseline measures
19%
no
Exposure A (score)
Outcome at follow-up
Exposures
Outcome
13%
no
Measure 2
Outcome at follow-up
Baseline measures
Outcome
12%
no
Sex
Age (years)
Background
Background
7%
no
Sex
Outcome at follow-up
Background
Outcome
6%
no
Exposure A (score)
Exposure B
Exposures
Exposures
3%
no
Sex
Exposure B
Background
Exposures
3%
no
Exposure B
Measure 1
Exposures
Baseline measures
1%
no
Age (years)
Sex
Background
Background
1%
no
Exposure B
Exposure A (score)
Exposures
Exposures
1%
no
Variables ranked by information about each target
Mutual information (bits) is how much a variable tells about the target. It includes information passed on through other variables, so a variable can rank high without being directly connected to the target. The colour shows the relation in the learned structure. This is an association, not an effect estimate.
Table
Target
Variable
Layer
Mutual information (bits)
Relation
Arcs
Outcome at follow-up
Measure 3
Baseline measures
0.313
parent
1
Outcome at follow-up
Measure 2
Baseline measures
0.192
other
2
Outcome at follow-up
Exposure B
Exposures
0.130
parent
1
Outcome at follow-up
Measure 1
Baseline measures
0.122
other
2
Outcome at follow-up
Exposure A (score)
Exposures
0.086
other
3
Outcome at follow-up
Age (years)
Background
0.081
other
2
Outcome at follow-up
Sex
Background
0.005
other
4
Network: without_exposures
The same, without the exposure layer.
Arc darkness and the percentage show how often the arc appears when the network is learned again on resampled data (arc stability). Arc width is the mutual information between the two variables. A wide, light arc is informative but unstable. A dashed arc occurred in fewer than half of the resamples. There is no fixed threshold for a stable arc: report the frequency.
Arc stability
In network says whether the arc is in the single network learned from all data. This is a different question from stability, and the two can disagree in both directions.
All arcs (table)
Parent
Child
Parent layer
Child layer
Frequency
In network
Mutual information (bits)
Measure 3
Outcome at follow-up
Baseline measures
Outcome
100%
yes
0.334
Age (years)
Measure 1
Background
Baseline measures
100%
yes
0.381
Measure 3
Measure 2
Baseline measures
Baseline measures
98%
yes
0.504
Measure 1
Measure 3
Baseline measures
Baseline measures
98%
yes
0.516
Sex
Measure 1
Background
Baseline measures
94%
yes
0.024
Measure 1
Measure 2
Baseline measures
Baseline measures
66%
yes
0.192
Measure 2
Outcome at follow-up
Baseline measures
Outcome
62%
no
Age (years)
Outcome at follow-up
Background
Outcome
48%
no
Measure 1
Outcome at follow-up
Baseline measures
Outcome
36%
no
Sex
Outcome at follow-up
Background
Outcome
26%
no
Sex
Measure 3
Background
Baseline measures
14%
no
Age (years)
Measure 3
Background
Baseline measures
12%
no
Sex
Age (years)
Background
Background
6%
no
Age (years)
Sex
Background
Background
2%
no
Measure 2
Measure 3
Baseline measures
Baseline measures
2%
no
Age (years)
Measure 2
Background
Baseline measures
2%
no
Measure 3
Measure 1
Baseline measures
Baseline measures
2%
no
Sex
Measure 2
Background
Baseline measures
2%
no
Variables ranked by information about each target
Mutual information (bits) is how much a variable tells about the target. It includes information passed on through other variables, so a variable can rank high without being directly connected to the target. The colour shows the relation in the learned structure. This is an association, not an effect estimate.
Table
Target
Variable
Layer
Mutual information (bits)
Relation
Arcs
Outcome at follow-up
Measure 3
Baseline measures
0.334
parent
1
Outcome at follow-up
Measure 1
Baseline measures
0.162
other
2
Outcome at follow-up
Measure 2
Baseline measures
0.160
other
2
Outcome at follow-up
Age (years)
Background
0.065
other
3
Outcome at follow-up
Sex
Background
0.004
other
3
Profiles
Probability of each target state for the profiles defined in the settings (network: all_variables). The point is the mean over bootstrap resamples and the line is the 95% percentile interval. Each resample learns the structure and the parameters again, so the interval includes both sources of uncertainty. Values given for a profile were placed in the bin they belong to; see the notes above.
Profile
Target
State
Probability
SD
CI 2.5%
CI 97.5%
Resamples
Older, high exposure
Outcome at follow-up
No
11%
2%
6%
15%
100
Older, high exposure
Outcome at follow-up
Yes
89%
2%
85%
94%
100
Younger, low exposure
Outcome at follow-up
No
90%
3%
83%
94%
100
Younger, low exposure
Outcome at follow-up
Yes
10%
3%
6%
17%
100
Sweep: Exposure A (score)
One variable is moved across its states while the rest of the profile is held fixed. A rising or falling line means the target probability depends on that variable in the learned distribution. A flat line can also arise if a variable between the moved variable and the target is held fixed. These are conditional probabilities. They describe people who differ in the variable, not the effect of changing it in one person.
Table
target
variable_state
target_state
probability
ci_low
ci_high
resamples
Outcome at follow-up
< 35.2
No
63%
50%
76%
100
Outcome at follow-up
< 35.2
Yes
37%
24%
50%
100
Outcome at follow-up
35.2 to < 43.6
No
54%
43%
63%
100
Outcome at follow-up
35.2 to < 43.6
Yes
46%
37%
57%
100
Outcome at follow-up
43.6 to < 52.3
No
44%
36%
51%
100
Outcome at follow-up
43.6 to < 52.3
Yes
56%
49%
64%
100
Outcome at follow-up
≥ 52.3
No
31%
24%
40%
100
Outcome at follow-up
≥ 52.3
Yes
69%
60%
76%
100
Comparison of networks
Arc stability in each network. A dash means the arc did not occur in any resample of that network, or the arc is not possible there. Use this to see what changes when a layer or a variable is left out.
Methods
A description of what was done, based on the settings of this run. Adapt it for a manuscript and check it against your own choices.
Bayesian networks were learned from 800 participants with pyAgrum 2.3.2, using a tabu search and the K2 score, with at most 5 parents per variable (random seed 42). Continuous variables (5 of 8) were discretised into 4 quantile-based bins; variables with at most 10 distinct values were used as categories, except 3 variable(s) with their own setting in the design table. The 8 variables were arranged in 4 ordered layers based on prior knowledge of the order of influence. Arcs were only allowed from a layer to itself or to a later layer, and not within Outcome. The stability of each arc was assessed by learning the network, including its structure, on 50 to 100 bootstrap resamples of the participants (sampling with replacement, same bins in every resample) and recording the proportion of resamples that contained the arc. The strength of an arc was expressed as the mutual information (in bits) between its two variables in the fitted network. The importance of each variable for a target was expressed as its mutual information with the target, together with its relation to the target in the learned structure. Probabilities of the targets for defined profiles were obtained by entering the profile values as evidence in each bootstrap network; the reported interval is the 2.5th to 97.5th percentile over resamples. These are conditional probabilities in the learned distribution; the arcs describe the assumed order of variables and associations that are supported by the data, not established causal effects.
Reproducibility
Setting
Value
Score / search
K2 / tabu
Maximum parents
5
Random seed
42
Binning
4 quantile bins; categories up to 10 levels
Bootstrap resamples
all_variables: 100, without_exposures: 50
Missing data
error
Forbidden arcs
0
Required arcs
0
File
Name
SHA-256 (first 16)
Content
Settings
settings.yml
6012045de8d3cac0
7791 bytes
Design table
variables.xlsx
805d52384afb3495
8 variables
Data
demo_cohort.csv
9494ec81a0be5a09
800 rows x 8 columns
Software
Version
layerbn
3.0.1
Python
3.12.16
pyAgrum
2.3.2
pandas
3.1.2
numpy
2.5.5
scikit-learn
1.8.0
matplotlib
3.11.2
Platform
Linux 7.0.0-1018-aws
The settings and the design table used are copied to the inputs folder next to this report.