Skip to content

bnlearn

5.2.1

Bayesian Network Structure Learning, Parameter Learning and Inference

33packages depend
322.2Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Marco ScutariFirst published 2007-09-2167 releasesCRAN page ↗

Bayesian network structure learning, parameter learning and inference. This package implements constraint-based (PC, GS, IAMB, Inter-IAMB, MMPC, Hiton-PC, HPC), pairwise (ARACNE and Chow-Liu), score-based (Hill-Climbing, Tabu Search, DirectLiNGAM) and hybrid (MMHC, RSMAX2, H2PC) structure learning algorithms for discrete, Gaussian, conditional Gaussian and zero-inflated networks, along with many score functions and conditional independence tests. The Naive Bayes and the Tree-Augmented Naive Bayes (TAN) classifiers are also implemented. Some utility functions (model comparison and manipulation, random data generation, arc orientation testing, simple and advanced plots) are included, as well as support for parameter estimation (maximum likelihood and Bayesian) and inference, conditional probability queries, interventions, counterfactuals, cross-validation, bootstrap and model averaging. Development snapshots with the latest bugfixes are available from https://www.bnlearn.com/.

Install

Health

CRAN checks
13OK
Slowest check: 4.9 min · r-oldrel-windows-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
1
Dependencies · direct
Check history
  • OK2026-07-22
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • WARNING2026-07-14
    10 OK · 0 NOTE · 3 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-04-25
    12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-03-10
    13 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesNopkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
87%
Documented parameters
88%
Return-value docs
98%
References docs
30%

Downloads

322.2K
CRAN downloads in the past year
Rank #606 · ~883/day · ~26.8K/mo
Daily download trend is not available in this view yet.
46.7K30 days
111.2K90 days
322.2K1 year
Compare downloads with other packages →
Also on813 r2u49 autocran6.6K conda_forge621 c2d4u

Dependencies

Declared dependencies
8 external dependencies (excludes base and recommended)
Depends (2)
R >= 4.4.0methods
Imports (0)
none
LinkingTo (0)
none
Enhances (0)
none

Code & Tests

Code Composition
C 30,729 (49%)R 25,529 (41%)Rd 6,662 (11%)
Code characteristics
Object systems
S385S4 class5S4 generic1S4 method8
Cyclomatic complexity
3.0 median / 43 max
System requirements
1 external

Test coverage

Line coverage

Expression

Tests / Examples

Functions

1194 155 exported

Complexity

5.3 avg / 43 max

Call network

1194 nodes / 3176 edges

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

Datasets

Bundled datasets · 10
NameClassRows × ColsAlso ships in
alarmdata.frame20,000 × 37
asiadata.frame5,000 × 8
clgaussian.testdata.frame5,000 × 8
coronarydata.frame1,841 × 6
gaussian.testdata.frame5,000 × 7
hailfinderdata.frame20,000 × 56
insurancedata.frame20,000 × 27
learning.testdata.frame5,000 × 6
lizardsdata.frame409 × 3
marksdata.frame88 × 5

People & History

People (2)
Maintainer (1)
Author, Maintainer
Authors (1)
Author, Maintainer
Contributors (1)
Contributor · added in 4.7
Listed in earlier versions (1)
no longer listed · 4.2 to 4.9.4
Package Timeline

67 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 5.2.1Latest
    2026-07-17 · current release · diff ↗
  • 5.2
    2026-07-13 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 5.1
    2025-08-20 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 5.0.2
    2025-01-07 · diff ↗
  • 5.0.1
    2024-08-19 · diff ↗
  • 5.0
    2024-07-30 · diff ↗
  • 4.9.4
    2024-05-03 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 4.9.3
    2024-03-15 · diff ↗
  • 4.9.2
    2024-03-12 · diff ↗
  • 4.9.1
    2023-12-05 · diff ↗
  • 4.9
    2023-09-07 · diff ↗
  • 4.8.3
    2023-04-29 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
Show 76 earlier events
  • 4.8.1
    2022-09-22 · diff ↗
  • 4.8
    2022-09-19 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 4.7.1
    2022-03-31 · diff ↗
  • 4.7
    2021-09-06 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 4.6.1
    2020-09-21 · diff ↗
  • 4.6
    2020-09-15 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 4.5
    2019-08-05 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 4.4.1
    2019-03-05 · diff ↗
  • 4.4
    2018-10-16 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 4.3
    2018-01-15 · diff ↗
  • 4.2
    2017-07-03 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • 4.1.1
    2017-03-26 · diff ↗
  • 4.1
    2017-02-09 · diff ↗
  • 4.0
    2016-05-16 · diff ↗
  • R
    R 3.3.0 released · 2016-05-03
  • 3.9
    2015-11-27 · diff ↗
  • 3.8.1
    2015-05-17 · diff ↗
  • 3.8
    2015-05-03 · diff ↗
  • R
    R 3.2.0 released · 2015-04-16
  • 3.7.1
    2015-01-23 · diff ↗
  • 3.7
    2015-01-14 · diff ↗
  • 3.6
    2014-06-17 · diff ↗
  • R
    R 3.1.0 released · 2014-04-10
  • 3.5
    2014-01-23 · diff ↗
  • 3.4
    2013-07-26 · diff ↗
  • R
    R 3.0.0 released · 2013-04-03
  • 3.3
    2013-03-05 · diff ↗
  • 3.2
    2012-11-18 · diff ↗
  • 3.1
    2012-09-27 · diff ↗
  • 3.0
    2012-07-05 · diff ↗
  • R
    R 2.15.0 released · 2012-03-30
  • 2.9
    2012-03-05 · diff ↗
  • 2.8
    2011-12-05 · diff ↗
  • R
    R 2.14.0 released · 2011-10-31
  • 2.7
    2011-10-08 · diff ↗
  • 2.6
    2011-08-28 · diff ↗
  • 2.5
    2011-06-02 · diff ↗
  • R
    R 2.13.0 released · 2011-04-13
  • 2.4
    2011-02-27 · diff ↗
  • 2.3
    2010-11-19 · diff ↗
  • R
    R 2.12.0 released · 2010-10-15
  • 2.2
    2010-08-18 · diff ↗
  • 2.1.1
    2010-07-10 · diff ↗
  • 2.1
    2010-06-14 · diff ↗
  • 2.0
    2010-05-11 · diff ↗
  • R
    R 2.11.0 released · 2010-04-22
  • 1.9
    2010-02-14 · diff ↗
  • 1.8
    2010-01-07 · diff ↗
  • 1.7
    2009-10-26 · diff ↗
  • R
    R 2.10.0 released · 2009-10-26
  • 1.6
    2009-08-24 · diff ↗
  • 1.5
    2009-07-21 · diff ↗
  • 1.4.1
    2009-06-14 · diff ↗
  • 1.4
    2009-05-05 · diff ↗
  • R
    R 2.9.0 released · 2009-04-17
  • 1.3
    2009-03-29 · diff ↗
  • 1.2
    2009-02-05 · diff ↗
  • 1.1
    2009-01-14 · diff ↗
  • 1.0
    2008-11-02 · diff ↗
  • R
    R 2.8.0 released · 2008-10-20
  • 0.9
    2008-09-08 · diff ↗
  • 0.8
    2008-06-20 · diff ↗
  • R
    R 2.7.0 released · 2008-04-22
  • 0.7
    2008-03-26 · diff ↗
  • 0.6
    2008-02-09 · diff ↗
  • 0.5
    2007-12-08 · diff ↗
  • 0.4
    2007-11-11 · diff ↗
  • R
    R 2.6.0 released · 2007-10-03
  • 0.3
    2007-09-21
  • R
    R 2.5.0 released · 2007-04-24

Package metadata

First published
2007-09-21
Total releases
67 / 19 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 4.4.0
Bundled data
901 KB / 10 files
Download size
1.3 MB
Installed size
not tracked yet
With dependencies
not tracked yet
Report a problem with this page →