Grid search for lower and upper bounds of continuous conformal prediction intervals
grid_finder(
y_min,
y_max,
ncs,
ncs_type,
y_hat,
alpha,
min_step = NULL,
grid_size = NULL,
calib = NULL,
coefs = NULL,
distance_weighted_cp = FALSE,
distance_features_calib = NULL,
distance_features_pred = NULL,
distance_type = c("mahalanobis", "euclidean"),
normalize_distance = c("minmax", "sd", "none"),
weight_function = gauss_kern
)a tibble with the predicted values and the lower and upper bounds of the prediction intervals
minimum value to search
maximum value to search
vector of non-conformity scores
String indicating the non-conformity score function to use
vector of predicted values
confidence level
The minimum step size for the grid search
Alternative to min_step, the number of points to use in the grid search between the lower and upper bound
a tibble with the predicted values and the true values of the calibration partition. Used when weighted_cp is TRUE. Default is NULL
a numeric vector of coefficients for the heterogeneous error model. Must be of length 2, where the first element is the intercept and the second element is the slope. Used when ncs_type is 'heterogeneous_error'. Default is NULL
logical. If TRUE, the non-conformity scores will be weighted according to the distance function
a matrix of features for the calibration partition. Used when distance_weighted_cp is TRUE
a matrix of features for the prediction partition. Used when distance_weighted_cp is TRUE
The type of distance metric to use when computing distances between calibration and prediction points. Options are 'mahalanobis' (default) and 'euclidean'.
Either "none", "minmax", or "sd". Indicates how to normalize the distances when distance_weighted_cp is TRUE
a function to use for weighting the distances. Can be 'gaussian_kernel', 'caucy_kernel', 'logistic', or 'reciprocal_linear'. Default is 'gaussian_kernel'