grid_finder | R Documentation |
Grid search for lower and upper bounds of continuous conformal prediction intervals
grid_finder(
y_min,
y_max,
ncs,
ncs_function,
y_hat,
alpha,
min_step = NULL,
grid_size = NULL,
return_min_q = FALSE,
weighted_cp = FALSE,
calib = NULL
)
y_min |
minimum value to search |
y_max |
maximum value to search |
ncs |
vector of non-conformity scores |
ncs_function |
a function that takes a vector of predicted values and a vector of true values and returns a vector of non-conformity scores |
y_hat |
vector of predicted values |
alpha |
confidence level |
min_step |
The minimum step size for the grid search |
grid_size |
Alternative to min_step, the number of points to use in the grid search between the lower and upper bound |
return_min_q |
logical. If TRUE, the function will return the minimum quantile of the nonconformity scores for each predicted value |
weighted_cp |
logical. If TRUE, the function will use the weighted conformal prediction method. Default is FALSE |
calib |
a tibble with the predicted values and the true values of the calibration partition. Used when weighted_cp is TRUE. Default is NULL |
a tibble with the predicted values and the lower and upper bounds of the prediction intervals
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.