Example study

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

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.
Layers and variables
Variable table
OrderLayerTime pointVariableColumnTargetMissing values
1BackgroundAge (years)AGE
1BackgroundSexSEX
2ExposuresExposure A (score)EXPOSURE_A
2ExposuresExposure BEXPOSURE_B
3Baseline measuresMeasure 1MEASURE_1
3Baseline measuresMeasure 2MEASURE_2
3Baseline measuresMeasure 3MEASURE_3
4OutcomeOutcome at follow-upOUTCOMEyes

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.
Distributions and bin edges
VariableTreated asStatesBins or categoriesExact edges
Age (years)continuous, binned4< 53.1 | 53.1 to < 59.5 | 59.5 to < 66.8 | ≥ 66.8(30;53.1[ | [53.1;59.55[ | [59.55;66.75[ | [66.75;90)
Sexcategorical2Female | Male
Exposure A (score)continuous, binned4< 35.2 | 35.2 to < 43.6 | 43.6 to < 52.3 | ≥ 52.3(8.9;35.2[ | [35.2;43.6[ | [43.6;52.349999999999994[ | [52.349999999999994;80.3)
Exposure Bcategorical2No | Yes
Measure 1continuous, binned4< 42 | 42 to < 48.8 | 48.8 to < 55 | ≥ 55(17.3;42.05[ | [42.05;48.75[ | [48.75;55.05[ | [55.05;81.2)
Measure 2continuous, binned4< 19.6 | 19.6 to < 24 | 24 to < 28.6 | ≥ 28.6(8.4;19.6[ | [19.6;24[ | [24;28.6[ | [28.6;44.2)
Measure 3continuous, binned4< 82.8 | 82.8 to < 93.3 | 93.3 to < 105 | ≥ 105(40.5;82.8[ | [82.8;93.35[ | [93.35;105.35[ | [105.35;139)
Outcome at follow-upcategorical2No | Yes

Network: all_variables

All variables in the design table.

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.
Network all_variables

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.
Arc stability all_variables
All arcs (table)
ParentChildParent layerChild layerFrequencyIn networkMutual information (bits)
SexExposure A (score)BackgroundExposures100%yes0.088
Exposure BOutcome at follow-upExposuresOutcome100%yes0.130
Age (years)Measure 1BackgroundBaseline measures100%yes0.357
Age (years)Exposure A (score)BackgroundExposures100%yes0.173
Measure 3Outcome at follow-upBaseline measuresOutcome100%yes0.313
Age (years)Exposure BBackgroundExposures100%yes0.088
Exposure BMeasure 2ExposuresBaseline measures100%yes0.293
Exposure A (score)Measure 2ExposuresBaseline measures94%yes0.286
Measure 2Measure 3Baseline measuresBaseline measures78%yes0.462
Exposure A (score)Measure 1ExposuresBaseline measures74%yes0.354
Measure 1Measure 3Baseline measuresBaseline measures73%yes0.428
Exposure A (score)Measure 3ExposuresBaseline measures63%no
Exposure BMeasure 3ExposuresBaseline measures43%no
Age (years)Outcome at follow-upBackgroundOutcome36%no
Measure 1Outcome at follow-upBaseline measuresOutcome34%no
Measure 3Measure 1Baseline measuresBaseline measures27%no
Measure 3Measure 2Baseline measuresBaseline measures22%no
Age (years)Measure 3BackgroundBaseline measures19%no
Exposure A (score)Outcome at follow-upExposuresOutcome13%no
Measure 2Outcome at follow-upBaseline measuresOutcome12%no
SexAge (years)BackgroundBackground7%no
SexOutcome at follow-upBackgroundOutcome6%no
Exposure A (score)Exposure BExposuresExposures3%no
SexExposure BBackgroundExposures3%no
Exposure BMeasure 1ExposuresBaseline measures1%no
Age (years)SexBackgroundBackground1%no
Exposure BExposure A (score)ExposuresExposures1%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.
Importance for Outcome at follow-up
Table
TargetVariableLayerMutual information (bits)RelationArcs
Outcome at follow-upMeasure 3Baseline measures0.313parent1
Outcome at follow-upMeasure 2Baseline measures0.192other2
Outcome at follow-upExposure BExposures0.130parent1
Outcome at follow-upMeasure 1Baseline measures0.122other2
Outcome at follow-upExposure A (score)Exposures0.086other3
Outcome at follow-upAge (years)Background0.081other2
Outcome at follow-upSexBackground0.005other4

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.
Network without_exposures

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.
Arc stability without_exposures
All arcs (table)
ParentChildParent layerChild layerFrequencyIn networkMutual information (bits)
Measure 3Outcome at follow-upBaseline measuresOutcome100%yes0.334
Age (years)Measure 1BackgroundBaseline measures100%yes0.381
Measure 3Measure 2Baseline measuresBaseline measures98%yes0.504
Measure 1Measure 3Baseline measuresBaseline measures98%yes0.516
SexMeasure 1BackgroundBaseline measures94%yes0.024
Measure 1Measure 2Baseline measuresBaseline measures66%yes0.192
Measure 2Outcome at follow-upBaseline measuresOutcome62%no
Age (years)Outcome at follow-upBackgroundOutcome48%no
Measure 1Outcome at follow-upBaseline measuresOutcome36%no
SexOutcome at follow-upBackgroundOutcome26%no
SexMeasure 3BackgroundBaseline measures14%no
Age (years)Measure 3BackgroundBaseline measures12%no
SexAge (years)BackgroundBackground6%no
Age (years)SexBackgroundBackground2%no
Measure 2Measure 3Baseline measuresBaseline measures2%no
Age (years)Measure 2BackgroundBaseline measures2%no
Measure 3Measure 1Baseline measuresBaseline measures2%no
SexMeasure 2BackgroundBaseline measures2%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.
Importance for Outcome at follow-up
Table
TargetVariableLayerMutual information (bits)RelationArcs
Outcome at follow-upMeasure 3Baseline measures0.334parent1
Outcome at follow-upMeasure 1Baseline measures0.162other2
Outcome at follow-upMeasure 2Baseline measures0.160other2
Outcome at follow-upAge (years)Background0.065other3
Outcome at follow-upSexBackground0.004other3

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.
Profiles
ProfileTargetStateProbabilitySDCI 2.5%CI 97.5%Resamples
Older, high exposureOutcome at follow-upNo11%2%6%15%100
Older, high exposureOutcome at follow-upYes89%2%85%94%100
Younger, low exposureOutcome at follow-upNo90%3%83%94%100
Younger, low exposureOutcome at follow-upYes10%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.
Sweep
Table
targetvariable_statetarget_stateprobabilityci_lowci_highresamples
Outcome at follow-up< 35.2No63%50%76%100
Outcome at follow-up< 35.2Yes37%24%50%100
Outcome at follow-up35.2 to < 43.6No54%43%63%100
Outcome at follow-up35.2 to < 43.6Yes46%37%57%100
Outcome at follow-up43.6 to < 52.3No44%36%51%100
Outcome at follow-up43.6 to < 52.3Yes56%49%64%100
Outcome at follow-up≥ 52.3No31%24%40%100
Outcome at follow-up≥ 52.3Yes69%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.
Network comparison

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

SettingValue
Score / searchK2 / tabu
Maximum parents5
Random seed42
Binning4 quantile bins; categories up to 10 levels
Bootstrap resamplesall_variables: 100, without_exposures: 50
Missing dataerror
Forbidden arcs0
Required arcs0
FileNameSHA-256 (first 16)Content
Settingssettings.yml6012045de8d3cac07791 bytes
Design tablevariables.xlsx805d52384afb34958 variables
Datademo_cohort.csv9494ec81a0be5a09800 rows x 8 columns
SoftwareVersion
layerbn3.0.1
Python3.12.16
pyAgrum2.3.2
pandas3.1.2
numpy2.5.5
scikit-learn1.8.0
matplotlib3.11.2
PlatformLinux 7.0.0-1018-aws

The settings and the design table used are copied to the inputs folder next to this report.