# Model Agnostic Prediction Intervals

## Documentation for package ‘pintervals’ version 1.0.1

- DESCRIPTION file.
- User guides, package vignettes and other documentation.

## Help Pages

abs_error | Absolute Error Function for Non-Conformity Scores
bcss_compute | Function to compute the between-cluster sum of squares (BCSS) for a set of clusters
bindividual_alpha | Bin-individual alpha function for conformal prediction
bin_chopper | Bin chopper function for binned bootstrapping
bootstrap_inner | Bootstrap function for bootstrapping the prediction intervals
cauchy_kern | Cauchy Kernel Function
ch_index | Function to compute the Calinski-Harabasz index for a set of clusters
class_to_clusters | Function to convert class vector to cluster vector based on calibrated clusters
clusterer | Function to cluster non-conformity scores using either Kolmogorov-Smirnov or K-means clustering
contiguize_intervals | Contiguize non-contiguous intervals
county_turnout | U.S. county-level turnout and demographic context (MIT Election Lab 2018 Election Analysis Dataset + additions)
coverage_gap_finder | Function to find the coverage gap for a set of clusters
Dm_finder | Function to find the minimum distance between a class and a set of clusters
dm_to_prob | Function to convert distance measure to probability
elections | Election-year democracy indicators from V-Dem (1946–2024)
flatten_cp_bin_intervals | Flatten binned conformal prediction intervals to contiguous intervals
gauss_kern | Gaussian Kernel Function
grid_finder | Grid search for lower and upper bounds of continuous conformal prediction intervals
grid_inner | Inner function for grid search
heterogeneous_error | Heterogeneous Error Function for Non-Conformity Scores
interval_coverage | Empirical coverage of prediction intervals
interval_miscoverage | Empirical miscoverage of prediction intervals
interval_score | Mean interval score (MIS) for prediction intervals
interval_width | Mean width of prediction intervals
kmeans_cluster_qecdf | Function to perform K-means clustering on quantile empirical cumulative distribution functions (qECDFs) of non-conformity scores
ks_cluster | Function to perform Kolmogorov-Smirnov clustering on non-conformity scores
ks_cluster_assignment_step | Function to assign classes to clusters based on Kolmogorov-Smirnov clustering
ks_cluster_init_step | Function to initialize clusters for Kolmogorov-Smirnov clustering
logistic_kern | Logistic Kernel Function
minq_to_alpha | Helper for minimum quantile to alpha function
ncs_compute | Non-Conformity Score Computation Function
optimize_clusters | Function to optimize clusters based on the Calinski-Harabasz index
pinterval_bccp | Bin-conditional conformal prediction intervals for continuous predictions
pinterval_bootstrap | Bootstrap prediction intervals
pinterval_ccp | Clustered conformal prediction intervals for continuous predictions
pinterval_conformal | Conformal Prediction Intervals of Continuous Values
pinterval_mondrian | Mondrian conformal prediction intervals for continuous predictions
pinterval_parametric | #' Parametric prediction intervals for continuous predictions
raw_error | Raw Error Function for Non-Conformity Scores
reciprocal_linear_kern | Reciprocal Linear Kernel Function
rel_error | Relative Error Function for Non-Conformity Scores by predicted Values
wcss_compute | Function to compute the within-cluster sum of squares (WCSS) for a set of clusters
za_rel_error | Zero-adjusted Relative Error Function for Non-Conformity Scores by predicted Values with a small adjustment