cal_apply function

Applies a calibration to a set of existing predictions

Applies a calibration to a set of existing predictions

cal_apply(.data, object, pred_class = NULL, parameters = NULL, ...) ## S3 method for class 'data.frame' cal_apply(.data, object, pred_class = NULL, parameters = NULL, ...) ## S3 method for class 'tune_results' cal_apply(.data, object, pred_class = NULL, parameters = NULL, ...) ## S3 method for class 'cal_object' cal_apply(.data, object, pred_class = NULL, parameters = NULL, ...)

Arguments

  • .data: An object that can process a calibration object.
  • object: The calibration object (cal_object).
  • pred_class: (Optional, classification only) Column identifier for the hard class predictions (a factor vector). This column will be adjusted based on changes to the calibrated probability columns.
  • parameters: (Optional) An optional tibble of tuning parameter values that can be used to filter the predicted values before processing. Applies only to tune_results objects.
  • ...: Optional arguments; currently unused.

Details

cal_apply() currently supports data.frames only. It extracts the truth and the estimate columns names from the calibration object.

Examples

# ------------------------------------------------------------------------------ # classification example w_calibration <- cal_estimate_logistic(segment_logistic, Class) cal_apply(segment_logistic, w_calibration)

See Also

https://www.tidymodels.org/learn/models/calibration/, cal_estimate_beta(), cal_estimate_isotonic(), cal_estimate_isotonic_boot(), cal_estimate_linear(), cal_estimate_logistic(), cal_estimate_multinomial()