Skip to contents

This function fits a Gaussian Process model to a data.frame and then generates predictions from the fitted model.

Usage

fit_predict_gp(
  df,
  t_steps = 1000,
  complete_sigma = FALSE,
  prepare_dataframe = FALSE,
  estimate_derivatives = FALSE,
  delete = TRUE,
  pred_for_t = NULL
)

Arguments

df

A data.frame with the data that is to be modelled. Must have timepoint, timepoint_n, curve_id, and od fields.

t_steps

the number of timepoints within the range od df$timepoints to predict

complete_sigma

A logical indicating whether the complete covariance matrix should be returned. This is necessary if you want to re-sample the posterior.

prepare_dataframe

A logical indicating whether a data.frame with the mean data should be prepared.

estimate_derivatives

A logical indicating whether the empirical derivatives should be computed.

delete

A logical indicating whether the GP model should be deleted from memory FALSE.

pred_for_t

A numeric value inidicating a specific timepoint t for which OD should be predicted

Value

An object with the fitted model and prediction results. The results include the predictions (p) and the prediction inputs (XX).