LearningHC {MoTBFs} | R 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 |
numIntervals |
A |
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
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)
[Package MoTBFs version 1.4.1 Index]