Description Usage Arguments Value Author(s) Examples
Function for fitting time-dependent and time-independent GP models and computing the Bayes factors.
1 2 | apply_gpTest(x, y, v, nullModelKernelTypes = c("white", "fixedvariance"),
modelKernelTypes = c("rbf", "white", "fixedvariance"), y_fitted = FALSE)
|
x |
One-column matrix which contains the input values, i.e., time points for GP models. The values given in this vector are used in GP model, so if any transformation is needed, remember to transform them now. |
y |
One-column matrix which contains the observed
values at the corresponding time points given in |
v |
One-column matrix which contains the fixed
variances at the corresponding time points given in |
nullModelKernelTypes |
Character vector which contains the type of the kernels which will be used in the null, i.e., time-independent GP model. Default is c("white","fixedvariance"). |
modelKernelTypes |
Character vector which contains the type of
the kernels which will be used in the time-dependent
GP model. Default is c("rbf","white","fixedvariance").
Kernel types: |
y_fitted |
Logical variable indicating whether the fitted y values at the observed time points will be given or not. Default is set to FALSE. |
Return list which contains logged Bayes factors (logBF) and the fitted GP models (nullModel & model) with the specified kernel structures. If y_fitted is set to TRUE, fitted y values of the model are returned in y_fitted as the list element.
Hande Topa, hande.topa@helsinki.fi
1 2 3 4 5 6 7 8 9 10 | x=as.matrix(seq(1,10))
y=as.matrix(sin(x))
v=as.matrix(runif(10,0,0.5))
nullModelKernelTypes=c("white","fixedvariance")
modelKernelTypes=c("rbf","white","fixedvariance")
test_result=apply_gpTest(x,y,v,nullModelKernelTypes,modelKernelTypes,y_fitted=TRUE)
null_model=test_result$nullModel
model=test_result$model
logBF=test_result$logBF
y_fitted=test_result$y_fitted
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.