goodnessMoTBFBN {MoTBFs} | R Documentation |
BIC of a hybrid BN
Description
Compute the BIC score and the loglikelihood from the fitted MoTBFs functions in a hybrid Bayesian network.
Usage
logLikelihood.MoTBFBN(MoTBF.BN, data)
BiC.MoTBFBN(MoTBF.BN, data)
Arguments
MoTBF.BN |
The output of the 'MoTBF_Learning' method. |
data |
The dataset of class |
Value
A numeric value giving the log-likelihood of the BN.
See Also
Examples
## Dataset Ecoli
require(MoTBFs)
data(ecoli)
data <- ecoli[,-c(1)] ## remove variable sequence
## Directed acyclic graph
dag <- LearningHC(data)
## Learning BN
intervals <- 3
potential <- "MOP"
P1 <- MoTBFs_Learning(graph = dag, data = data, POTENTIAL_TYPE=potential,
numIntervals = intervals, maxParam = 5)
logLikelihood.MoTBFBN(P1, data) ##BIC$LogLikelihood
BIC <- BiC.MoTBFBN(P1, data)
BIC$BIC
## Learning BN
intervals <- 2
potential <- "MTE"
P2 <- MoTBFs_Learning(graph = dag, data = data, POTENTIAL_TYPE=potential,
numIntervals = intervals, maxParam = 10)
logLikelihood.MoTBFBN(P2, data) ##BIC$LogLikelihood
BIC <- BiC.MoTBFBN(P2, data)
BIC$BIC
[Package MoTBFs version 1.4.1 Index]