MoTBFs (version 1.2)

LearningHC: Learning Hybric Bayesian Networks

Description

Get a directed acyclic graph using the method hill climbing. It is a mathematical optimization technique which belongs to the family of local search. It is an iterative algorithm which deals with discrete and continuous variables.

Usage

LearningHC(dataset, numIntervals = NULL)

Arguments

dataset

A dataset with discrete and continuous variables. Discrete variables must be of class "factor", if not they are transformed into factores.

numIntervals

A "numeric" value containing the number of intervals to create a discrete dataset. The method used to split the values is by equal width. By default it is NULL and means the variables are not discretized to get the network.

Value

The output is a "bn" object containing the learned graph.

See Also

hc

Examples

Run this code
# NOT RUN {
## Data
data(ecoli)
ecoli <- ecoli[,-1] ## Sequence Name

## DAG1
dag1 <- LearningHC(ecoli)
dag1
plot(dag1)

## DAG2
dag2 <- LearningHC(ecoli, numIntervals = 10)
dag2
plot(dag2)


# }

Run the code above in your browser using DataLab