LearningHC: Score-based hybrid Bayesian Network structure learning

View source: R/structuralLearning.R

LearningHCR Documentation

Score-based hybrid Bayesian Network structure learning

Description

Learn the structure of a hybrid Bayesian network using the hill climbing local search method.

Usage

LearningHC(dataset, numIntervals = NULL)

Arguments

dataset

A dataset with discrete and continuous variables. If the discrete variables are not of class "factor", they are automatically converted.

numIntervals

A "numeric" value indicating the number of categories used when discretizing a continuous variable, corresponding to intervals of equal width. By default it is NULL, meaning that the continuous variables are not discretized.

Details

LearningHC() automatically converts non-numeric variables into factors before calling function hc() from the bnlearn package. LearningHC() can also be used to discretize the dataset, using the equal width method, before calling hc().

Value

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

See Also

hc

Examples


## Data
data(ecoli)
ecoli <- ecoli[,-1] ## Sequence Name

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

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



MoTBFs documentation built on April 18, 2022, 5:06 p.m.

Related to LearningHC in MoTBFs...