MoTBFs (version 1.2)

goodnessMoTBFBN: BIC of an MoTBF BN

Description

Compute the Bic score and the loglikelihood from the fitted MoTBFs functions of 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 "data frame".

Value

A numeric value giving the log-likelihood of the BN.

See Also

MoTBFs_Learning

Examples

Run this code
# NOT RUN {
## 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 
# }

Run the code above in your browser using DataLab