# NOT RUN {
## Data
X <- rnorm(15)
## Prior Data
priordata <- rnorm(5000)
## Test data
test <- rnorm(1000)
testData <- test[test>=min(X)&test<=max(X)]
## Learning
type <- "MOP"
confident <- 3 ## confident <- 1,2,...,length(X)
f <- learnMoTBFpriorInformation(priorData = priordata, data = X, s = confident,
POTENTIAL_TYPE = type)
attributes(f)
## Log-likelihood
sum(log(as.function(f$dataFunction)(testData)))
sum(log(as.function(f$posteriorFunction)(testData))) ## best loglikelihood
# }
Run the code above in your browser using DataLab