Skip to contents

Generates predictions from the fitted oblr model. Can return probabilities, link values, or class predictions.

Usage

# S3 method for class 'oblr'
predict(
  object,
  newdata = NULL,
  type = c("proba", "class", "link"),
  cutoff = 0.5,
  ...
)

Arguments

object

An object of class oblr.

newdata

A data frame or data.table containing new data for prediction. If NULL, uses the data from the fit.

type

The type of prediction to return: "link" for the linear predictor, "proba" for probabilities, or "class" for class predictions.

cutoff

The probability cutoff for class prediction. Default is 0.5. Only used when type = "class".

...

Additional arguments passed to or from other methods.

Value

A numeric vector of predictions. For type = "class", returns a factor with levels 0 and 1.