gpfrPredict: Prediction of GPFR model

View source: R/gpfr.functions6.R

gpfrPredictR Documentation

Prediction of GPFR model

Description

Make predictions for test input data based on the GPFR model learnt by the 'gpfr' function. Both Type I and Type II predictions can be made.

Usage

gpfrPredict(
  train,
  testInputGP,
  testTime = NULL,
  uReg = NULL,
  fxReg = NULL,
  gpReg = NULL,
  GPpredict = TRUE
)

Arguments

train

An object of class 'gpfr' obtained by the the 'gpfr' function.

testInputGP

Test input data for the GP prediction. It must be a numeric vector, a matrix or an 'fd' object.

testTime

Test time points for prediction. If NULL, default settings will be applied.

uReg

Scalar covariates data of a new batch for the FR model.

fxReg

Functional covariates data of a new batch for the FR model.

gpReg

Input data for the GP part used for Type I prediction. It must be a list of three items. The names of the items must be 'response', 'input', and 'time'. The item 'response' is the observed response for a new batch; 'input' is the observed functional covariates for a new batch,;'time' is the observed time for the previous two. If NULL (default), Type II prediction is carried out.

GPpredict

Logical. If TRUE (default), GPFR prediction is carried out; otherwise only predictions based on the FR model is carried out.

Details

If 'gpReg' is provided, then Type I prediction is made. Otherwise, Type II prediction is made.

Value

A list containing:

ypred.mean

The mean values of the prediction.

ypred.sd

The standard deviation of the predictions.

predictionType

Prediction type if GPFR prediction is carried out.

train

All items trained by 'gpfr'.

References

  • Ramsay, J., and Silverman, B. W. (2006), “Functional Data Analysis”, 2nd ed., Springer, New York.

  • Shi, J. Q., and Choi, T. (2011), “Gaussian Process Regression Analysis for Functional Data”, CRC Press.

Examples

## See examples in vignette:
# vignette("gpfr", package = "GPFDA")

GPFDA documentation built on Sept. 11, 2023, 1:08 a.m.