| grid_finder | R Documentation |
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
)
y_min |
minimum value to search |
y_max |
maximum value to search |
ncs |
vector of non-conformity scores |
ncs_type |
String indicating the non-conformity score function to use |
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 |
calib |
a tibble with the predicted values and the true values of the calibration partition. Used when weighted_cp is TRUE. Default is NULL |
coefs |
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 |
distance_weighted_cp |
logical. If TRUE, the non-conformity scores will be weighted according to the distance function |
distance_features_calib |
a matrix of features for the calibration partition. Used when distance_weighted_cp is TRUE |
distance_features_pred |
a matrix of features for the prediction partition. Used when distance_weighted_cp is TRUE |
distance_type |
The type of distance metric to use when computing distances between calibration and prediction points. Options are 'mahalanobis' (default) and 'euclidean'. |
normalize_distance |
Either "none", "minmax", or "sd". Indicates how to normalize the distances when distance_weighted_cp is TRUE |
weight_function |
a function to use for weighting the distances. Can be 'gaussian_kernel', 'caucy_kernel', 'logistic', or 'reciprocal_linear'. Default is 'gaussian_kernel' |
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.