| bootstrap_inner | R Documentation |
Bootstrap Function for Bootstrapping the Prediction Intervals
bootstrap_inner(
pred,
calib,
error,
nboot,
alpha,
error_type = c("raw", "absolute"),
distance_weighted_bootstrap = FALSE,
distance_features_calib = NULL,
distance_features_pred = NULL,
distance_type = c("mahalanobis", "euclidean"),
normalize_distance = c("minmax", "sd", "none"),
weight_function = gauss_kern
)
pred |
predicted value |
calib |
a vector of predicted values for the calibration partition |
error |
vector of errors |
nboot |
number of bootstrap samples |
alpha |
confidence level |
error_type |
The type of error to use for the prediction intervals. Can be 'raw' or 'absolute'. If 'raw', bootstrapping will be done on the raw prediction errors. If 'absolute', bootstrapping will be done on the absolute prediction errors with random signs. Default is 'raw' |
distance_weighted_bootstrap |
logical. If TRUE, the bootstrap samples will be weighted according to the distance function |
distance_features_calib |
a matrix of features for the calibration partition. Used when distance_weighted_bootstrap is TRUE |
distance_features_pred |
a matrix of features for the prediction partition. Used when distance_weighted_bootstrap 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_bootstrap 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 numeric vector with the predicted value and the lower and upper bounds of the prediction interval
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.