getCoefficients {MoTBFs} | R Documentation |
Get the coefficients
Description
Compute the coefficients for the linear opinion pool
Usage
getCoefficients(fPI, rangeNewPriorData, fD, data, domain, coeffversion)
Arguments
fPI |
The function fitted to the prior data, of class |
rangeNewPriorData |
An array of length 2 with the new domain of the prior function. |
fD |
The function fitted to the original data, of class |
data |
A |
domain |
A |
coeffversion |
A |
Details
coeffversion
can be:
"1"
coef1 and coef2 are the sum of the probabilities of one of the function over the sum of all probabilities, respectively;
"2"
coef1 and coef2 are the solution of a linear optimization problem which tries to maximize the sum 1 for each row of probabilities;
"3"
coef1 and coef2 are the difference of the log-likelihood of the evaluated model and a random uniform model over the sum of both differences, respectively;
"4"
coef1 and coef2 are the difference of the log-likelihood of the evaluated model and a ramdom positive MoTBF model over the sum of both differences, respectively.
Value
A "numeric"
value of length 2 giving the coefficients which are the weigth of the two function to combine.
See Also
Examples
## Data
X <- rnorm(15)
## Prior Data
priordata <- rnorm(5000)
## Learning
confident <- 5
type <- "MOP"
f <- learnMoTBFpriorInformation(priorData = priordata, data = X, s = confident,
POTENTIAL_TYPE = type)
attributes(f)
## Coefficients: linear opinion pool
getCoefficients(fPI = f$priorFunction, rangeNewPriorData = f$domain, fD = f$dataFunction,
data = X, domain = range(X), coeffversion = 4)
getCoefficients(fPI = f$priorFunction, rangeNewPriorData = f$domain, fD = f$dataFunction,
data = X, domain = range(X), coeffversion = 1)
getCoefficients(fPI = f$priorFunction, rangeNewPriorData = f$domain, fD = f$dataFunction,
data = X, domain = range(X), coeffversion = 3)
getCoefficients(fPI = f$priorFunction, rangeNewPriorData = f$domain, fD = f$dataFunction,
data = X, domain = range(X), coeffversion = 2)