cal_apply | R Documentation |
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, ...)
.data |
An object that can process a calibration object. |
object |
The calibration 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 |
... |
Optional arguments; currently unused. |
cal_apply()
currently supports data.frames only. It extracts the truth
and
the estimate columns names from the calibration object.
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()
# ------------------------------------------------------------------------------
# classification example
w_calibration <- cal_estimate_logistic(segment_logistic, Class)
cal_apply(segment_logistic, w_calibration)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.