bnmat: Adjacency matrix of a Bayesian network

View source: R/bnmat.R

Adjacency matrix of a Bayesian networkR Documentation

Adjacency matrix of a Bayesian network

Description

Adjacency matrix of a Bayesian network.

Usage

bnmat(dag)

Arguments

dag

A BN object, an object of class "bn".

Details

The function is called from the "bnlearn" package which invokes the "Rgraphviz" package from Bioconductor and you need to install it first.

Value

Adjacency matrix of a Bayesian network is extracted.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

See Also

pchc, mmhc, fedhc

Examples


x <- matrix( rnorm(200 * 10, 1, 10), nrow = 200 )
a <- pchc::pchc(x)
pchc::bnmat(a$dag)


pchc documentation built on April 4, 2025, 1:11 a.m.