learnMoTBFpriorInformation {MoTBFs} | R Documentation |
Incorporating Prior Knowledge
Description
Learns a function using prior information.
Usage
learnMoTBFpriorInformation(
priorData,
data,
s,
POTENTIAL_TYPE,
domain = range(data),
coeffversion = 4,
restrictDomain = TRUE,
maxParam = NULL
)
Arguments
priorData |
A |
data |
A |
s |
A |
POTENTIAL_TYPE |
A |
domain |
A |
coeffversion |
A |
restrictDomain |
This argument lets us choose if the domain is used joining both domains,
the prior one and the data domain or trimming them. By default |
maxParam |
A |
Value
A list with the elements
coeffs |
An |
posteriorFunction |
The final function after combining. |
priorFunction |
The fit of the prior data. |
dataFunction |
The fit of the original data. |
rangeNewPriorData |
A |
See Also
Examples
## 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