nb8bn: number of Bayesian networks

View source: R/f09.misc.code.r

nb8bnR Documentation

number of Bayesian networks

Description

returns the number of different Bayesian networks having n labelled or not nodes. Non labelled nodes means that nodes are exchangeable: A -> B is identical to A <- B.

Usage

nb8bn(n, label=FALSE)

Arguments

n

number of nodes. Must be less or equal to 18.

label

Indicates if the nodes must be considered as labelled or not.

Details

When not labelled nodes, the results were proposed by Sloane in 'the on line encyclopedy of integer sequences' (http://oeis.org/A003087). For labelled nodes, just the application of the recursive formula of Robinson.

Value

Number of Bayesian networks

Examples

 nb8bn(5)
 nb8bn(5, TRUE);

rbmn documentation built on July 9, 2023, 6:37 p.m.