cal_validate_linear | R Documentation |
Measure performance with and without using linear regression calibration
cal_validate_linear(
.data,
truth = NULL,
estimate = dplyr::starts_with(".pred"),
metrics = NULL,
save_pred = FALSE,
...
)
## S3 method for class 'resample_results'
cal_validate_linear(
.data,
truth = NULL,
estimate = dplyr::starts_with(".pred"),
metrics = NULL,
save_pred = FALSE,
...
)
## S3 method for class 'rset'
cal_validate_linear(
.data,
truth = NULL,
estimate = dplyr::starts_with(".pred"),
metrics = NULL,
save_pred = FALSE,
...
)
.data |
An |
truth |
The column identifier for the true class results (that is a factor). This should be an unquoted column name. |
estimate |
A vector of column identifiers, or one of |
metrics |
A set of metrics passed created via |
save_pred |
Indicates whether to a column of post-calibration predictions. |
... |
Options to pass to |
By default, the average of the root mean square error (RMSE) is returned.
Any appropriate yardstick::metric_set()
can be used. The validation
function compares the average of the metrics before, and after the calibration.
https://www.tidymodels.org/learn/models/calibration/,
cal_estimate_linear()
library(dplyr)
library(yardstick)
library(rsample)
head(boosting_predictions_test)
reg_stats <- metric_set(rmse, ccc)
set.seed(828)
boosting_predictions_oob %>%
# Resample with 10-fold cross-validation
vfold_cv() %>%
cal_validate_linear(truth = outcome, smooth = FALSE, metrics = reg_stats)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.