BN-class: BN class definition.

Description Usage Arguments Details Value Slots Examples

Description

Instantiate a BN object.

Usage

1
2
3
4
## S4 method for signature 'BN'
initialize(.Object, dataset = NULL, ...)

BN(dataset = NULL, ...)

Arguments

.Object

a BN

dataset

a BNDataset object containing the dataset the network is built upon, if any. The remaining parameters are considered only if a starting dataset is provided.

...

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 continue

node.sizes:

if variable i is discrete, node.sizes[i] contains the cardinality of i, if i is instead discrete the value is the number of states variable i takes when discretized

cpts:

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

1
2
3
4
5
6
7
8
## Not run: 
net.1 <- BN()

dataset <- BNDataset()
dataset <- read.dataset(dataset, "file.header", "file.data")
net.2 <- BN(dataset)

## End(Not run)

tavazzie/bnstructScore documentation built on Dec. 23, 2021, 7:47 a.m.