BN-class {bnstruct} | R Documentation |
BN class definition.
Description
Instantiate a BN
object.
Usage
## S4 method for signature 'BN'
initialize(.Object, dataset = NULL, ...)
BN(dataset = NULL, ...)
Arguments
.Object |
a BN |
dataset |
a |
... |
potential further arguments of methods. |
Details
The constructor may be invoked without parameters – in this case an empty network will be created, and its slots will be filled manually by the user. This is usually viable only if the user already has knowledge about the network structure.
Value
BN object.
Slots
name
:name of the network
num.nodes
:number of nodes in the network
variables
:names of the variables in the network
discreteness
:TRUE
if variable is discrete,FALSE
if variable is continuenode.sizes
:if variable
i
is discrete,node.sizes[i]
contains the cardinality ofi
, ifi
is instead discrete the value is the number of states variablei
takes when discretizedcpts
:list of conditional probability tables of the network
dag
:adjacency matrix of the network
wpdag
:weighted partially dag
scoring.func
:scoring function used in structure learning (when performed)
struct.algo
:algorithm used in structure learning (when performed)
num.time.steps
:number of instants in which the network is observed (1, unless it is a Dynamic Bayesian Network)
discreteness
:TRUE
if variable is discrete,FALSE
if variable is continue
Examples
## Not run:
net.1 <- BN()
dataset <- BNDataset()
dataset <- read.dataset(dataset, "file.header", "file.data")
net.2 <- BN(dataset)
## End(Not run)