This function generates prediction intervals for new data using the fitted conformal model.

# S3 method for class 'conformalize'
predict(
  object,
  newdata,
  predict_func = predict,
  level = 0.95,
  method = c("splitconformal", "kde", "surrogate", "bootstrap"),
  n_sim = 250L,
  seed = 123L,
  ...
)

Arguments

object

A conformalize object.

newdata

A data frame or matrix of new data for prediction.

level

The confidence level for the prediction intervals. Default is 0.95.

method

The method to use for prediction intervals. Options are "split" or "simulation".

n_sim

The number of simulations to perform if using the "simulation" method. Default is 1000.

seed

An optional seed for reproducibility.

...

Additional arguments to pass to the predict function.

Value

A matrix with predictions and prediction intervals.