apply_gpTest: Performing Gaussian process test

Description Usage Arguments Value Author(s) Examples

Description

Function for fitting time-dependent and time-independent GP models and computing the Bayes factors.

Usage

1
2
apply_gpTest(x, y, v, nullModelKernelTypes = c("white", "fixedvariance"),
  modelKernelTypes = c("rbf", "white", "fixedvariance"), y_fitted = FALSE)

Arguments

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 x vector.

v

One-column matrix which contains the fixed variances at the corresponding time points given in x vector, with the corresponding observations given in y vector.

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: 'rbf', 'white', 'fixedvariance'. Note that the lower bound for the length scale parameter of rbf kernel is set to the minimum distance between consecutive time points in order to mitigate potential overfitting problems.

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.

Value

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.

Author(s)

Hande Topa, hande.topa@helsinki.fi

Examples

 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

PROBIC/GPrank documentation built on May 7, 2019, 11:53 p.m.