foreign: Read and write BIF, NET and DSC files

Description Usage Arguments Value Note Author(s) References

Description

Read networks saved from other programs into bn.fit objects, and dump bn.fit objects into files for other programs to read.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Old (non-XML) Bayesian Interchange files.
read.bif(file, debug = FALSE)
write.bif(file, fitted)

# Microsoft Interchange files.
read.dsc(file, debug = FALSE)
write.dsc(file, fitted)

# HUGIN flat network format.
read.net(file, debug = FALSE)
write.net(file, fitted)

Arguments

file

a connection object or a character string.

fitted

an object of class bn.fit.

debug

a boolean value. If TRUE a lot of debugging output is printed; otherwise the function is completely silent.

Value

read.bif, read.dsc and read.net return an object of class bn.fit.

write.bif, write.dsc and write.net return NULL invisibly.

Note

Most of the networks present in the Bayesian Network Repository have an associated BIF file that can be imported with read.bif.

HUGIN can import and export NET files; Netica can read (but not write) DSC files; and Genie can read and write both DSC and NET files.

Please note that these functions work on a "best effort" basis, as the parsing of these formats have been implementing by reverse engineering the file format from publicly available examples.

Author(s)

Marco Scutari

References

Elidan G (2001). "Bayesian Network Repository".
http://www.cs.huji.ac.il/site/labs/compbio/Repository.

Genie, http://genie.sis.pitt.edu.

HUGIN Expert, http://www.hugin.com.

Netica, http://www.norsys.com/netica.html.


vspinu/bnlearn documentation built on May 3, 2019, 7:08 p.m.