| Title: | Conformal Prediction and Uncertainty Quantification |
|---|---|
| Description: | Implements conformal prediction methods for constructing prediction intervals (regression) and prediction sets (classification) with finite-sample coverage guarantees. Methods include split conformal, 'CV+' and 'Jackknife+' (Barber et al. 2021) <doi:10.1214/20-AOS1965>, 'Conformalized Quantile Regression' (Romano et al. 2019) <doi:10.48550/arXiv.1905.03222>, 'Adaptive Prediction Sets' (Romano, Sesia, Candes 2020) <doi:10.48550/arXiv.2006.02544>, 'Regularized Adaptive Prediction Sets' (Angelopoulos et al. 2021) <doi:10.48550/arXiv.2009.14193>, Mondrian conformal prediction for group-conditional coverage (Vovk, Gammerman, and Shafer 2005) <doi:10.1007/b106715>, weighted conformal prediction for covariate shift (Tibshirani et al. 2019) <doi:10.48550/arXiv.1904.06019>, and adaptive conformal inference for sequential prediction (Gibbs and Candes 2021) <doi:10.48550/arXiv.2106.00170>. All methods are distribution-free and provide calibrated uncertainty quantification without parametric assumptions. Works with any model that can produce predictions from new data, including 'lm', 'glm', 'ranger', 'xgboost', and custom user-defined models. |
| Authors: | Charles Coverdale [aut, cre, cph] |
| Maintainer: | Charles Coverdale <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3.2 |
| Built: | 2026-05-30 17:00:51 UTC |
| Source: | https://github.com/charlescoverdale/predictset |
Implements basic Adaptive Conformal Inference (ACI) for sequential prediction. The miscoverage level alpha is adjusted online based on whether previous predictions covered the true values, maintaining long-run coverage even under distribution shift.
conformal_aci(y_pred, y_true, alpha = 0.1, gamma = 0.005)conformal_aci(y_pred, y_true, alpha = 0.1, gamma = 0.005)
y_pred |
A numeric vector of point predictions (sequential). |
y_true |
A numeric vector of true values (sequential). |
alpha |
Target miscoverage level. Default |
gamma |
Learning rate for alpha adjustment. Default |
ACI provides asymptotic coverage guarantees under distribution drift, not
the finite-sample guarantees of split conformal prediction. The long-run
average coverage converges to as the sequence length
grows (Gibbs and Candes, 2021).
A list with components:
Numeric vector of lower bounds.
Numeric vector of upper bounds.
Logical vector indicating whether each interval covered the true value.
Numeric vector of the adapted alpha values at each step.
Overall empirical coverage.
Gibbs, I. and Candes, E. (2021). Adaptive conformal inference under distribution shift. Advances in Neural Information Processing Systems, 34.
Other regression methods:
conformal_cqr(),
conformal_cv(),
conformal_jackknife(),
conformal_mondrian(),
conformal_split(),
conformal_weighted()
set.seed(42) n <- 200 y_true <- cumsum(rnorm(n, sd = 0.1)) + rnorm(n) y_pred <- c(0, y_true[-n]) # naive lag-1 prediction result <- conformal_aci(y_pred, y_true, alpha = 0.10, gamma = 0.01) print(result$coverage)set.seed(42) n <- 200 y_true <- cumsum(rnorm(n, sd = 0.1)) + rnorm(n) y_pred <- c(0, y_true[-n]) # naive lag-1 prediction result <- conformal_aci(y_pred, y_true, alpha = 0.10, gamma = 0.01) print(result$coverage)
Constructs prediction sets using the Adaptive Prediction Sets (APS) method of Romano, Sesia, and Candes (2020). Classes are included in order of decreasing predicted probability until the cumulative probability exceeds the conformal threshold.
conformal_aps( x, y, model, x_new, alpha = 0.1, cal_fraction = 0.5, randomize = FALSE, seed = NULL )conformal_aps( x, y, model, x_new, alpha = 0.1, cal_fraction = 0.5, randomize = FALSE, seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A factor (or character/integer vector coerced to factor) of class labels. |
model |
A |
x_new |
A numeric matrix or data frame of new predictor variables. |
alpha |
Miscoverage level. Default |
cal_fraction |
Fraction of data used for calibration. Default |
randomize |
Logical. If |
seed |
Optional random seed. |
When randomize = FALSE (the default), this implementation uses the
deterministic variant of APS, which provides conservative coverage (at
least ). The randomized variant (randomize = TRUE)
achieves exact coverage but produces non-reproducible
prediction sets.
A predictset_class object. See conformal_lac() for
details. The method component is "aps".
Romano, Y., Sesia, M. and Candes, E.J. (2020). Classification with valid and adaptive coverage. Advances in Neural Information Processing Systems, 33. doi:10.48550/arXiv.2006.02544
Other classification methods:
conformal_lac(),
conformal_mondrian_class(),
conformal_raps()
set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(sample(c("A", "B", "C"), n, replace = TRUE)) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = p / 2, B = p / 2, C = 1 - p) }, type = "classification" ) result <- conformal_aps(x, y, model = clf, x_new = x_new) print(result)set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(sample(c("A", "B", "C"), n, replace = TRUE)) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = p / 2, B = p / 2, C = 1 - p) }, type = "classification" ) result <- conformal_aps(x, y, model = clf, x_new = x_new) print(result)
[Deprecated] conformal_class_split() is identical to
conformal_lac() and is deprecated. Use conformal_lac() instead.
conformal_class_split( x, y, model, x_new, alpha = 0.1, cal_fraction = 0.5, seed = NULL )conformal_class_split( x, y, model, x_new, alpha = 0.1, cal_fraction = 0.5, seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A factor (or character/integer vector coerced to factor) of class labels. |
model |
A |
x_new |
A numeric matrix or data frame of new predictor variables. |
alpha |
Miscoverage level. Default |
cal_fraction |
Fraction of data used for calibration. Default |
seed |
Optional random seed. |
A predictset_class object. See conformal_lac() for details.
Sadinle, M., Lei, J. and Wasserman, L. (2019). Least ambiguous set-valued classifiers with bounded error levels. Journal of the American Statistical Association, 114(525), 223-234. doi:10.1080/01621459.2017.1395341
set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(ifelse(x[,1] + x[,2] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) { df <- data.frame(y = y, x) glm(y ~ ., data = df, family = "binomial") }, predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) suppressWarnings( result <- conformal_class_split(x, y, model = clf, x_new = x_new) )set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(ifelse(x[,1] + x[,2] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) { df <- data.frame(y = y, x) glm(y ~ ., data = df, family = "binomial") }, predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) suppressWarnings( result <- conformal_class_split(x, y, model = clf, x_new = x_new) )
Runs multiple conformal prediction methods on the same data and returns a comparison data frame with coverage, interval width, and computation time for each method.
conformal_compare( x, y, model, x_new, y_new, methods = c("split", "cv"), alpha = 0.1, seed = NULL )conformal_compare( x, y, model, x_new, y_new, methods = c("split", "cv"), alpha = 0.1, seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A numeric vector of response values. |
model |
A fitted model object, a |
x_new |
A numeric matrix or data frame of new predictor variables. |
y_new |
A numeric vector of true response values for |
methods |
Character vector of method names to compare. Default
|
alpha |
Miscoverage level. Default |
seed |
Optional random seed. |
A predictset_compare object (a data frame) with columns:
Character. The method name.
Numeric. Empirical coverage on y_new.
Numeric. Mean interval width.
Numeric. Median interval width.
Numeric. Elapsed time in seconds.
Other diagnostics:
conformal_pvalue(),
coverage(),
coverage_by_bin(),
coverage_by_group(),
interval_width(),
set_size()
set.seed(42) n <- 300 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(100 * 3), ncol = 3) y_new <- x_new[, 1] * 2 + rnorm(100) comp <- conformal_compare(x, y, model = y ~ ., x_new = x_new, y_new = y_new) print(comp)set.seed(42) n <- 300 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(100 * 3), ncol = 3) y_new <- x_new[, 1] * 2 + rnorm(100) comp <- conformal_compare(x, y, model = y ~ ., x_new = x_new, y_new = y_new) print(comp)
Constructs prediction intervals using Conformalized Quantile Regression (Romano et al. 2019). Requires two models: one for the lower quantile and one for the upper quantile. The conformal step adjusts these quantile predictions to achieve valid coverage.
conformal_cqr( x, y, model_lower, model_upper, x_new, alpha = 0.1, cal_fraction = 0.5, quantiles = c(0.05, 0.95), seed = NULL )conformal_cqr( x, y, model_lower, model_upper, x_new, alpha = 0.1, cal_fraction = 0.5, quantiles = c(0.05, 0.95), seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A numeric vector of response values. |
model_lower |
A |
model_upper |
A |
x_new |
A numeric matrix or data frame of new predictor variables. |
alpha |
Miscoverage level. Default |
cal_fraction |
Fraction of data used for calibration. Default |
quantiles |
The target quantiles. Default |
seed |
Optional random seed. |
Interval quality depends on the underlying quantile models. Poorly
calibrated quantile models produce valid but potentially wide intervals.
For best results, use proper quantile regression models (e.g.
quantreg::rq()) rather than shifted mean predictions.
A predictset_reg object. See conformal_split() for details.
The method component is "cqr".
Romano, Y., Patterson, E. and Candes, E.J. (2019). Conformalized quantile regression. Advances in Neural Information Processing Systems, 32. doi:10.48550/arXiv.1905.03222
Other regression methods:
conformal_aci(),
conformal_cv(),
conformal_jackknife(),
conformal_mondrian(),
conformal_split(),
conformal_weighted()
set.seed(42) n <- 200 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(20 * 3), ncol = 3) # Approximating quantile regression with shifted linear models. # In practice, use quantile regression models, e.g.: # quantreg::rq(y ~ ., data = df, tau = 0.05) model_lo <- make_model( train_fun = function(x, y) lm(y ~ ., data = data.frame(y = y, x)), predict_fun = function(obj, x_new) { predict(obj, newdata = as.data.frame(x_new)) - 1.5 }, type = "regression" ) model_hi <- make_model( train_fun = function(x, y) lm(y ~ ., data = data.frame(y = y, x)), predict_fun = function(obj, x_new) { predict(obj, newdata = as.data.frame(x_new)) + 1.5 }, type = "regression" ) result <- conformal_cqr(x, y, model_lo, model_hi, x_new = x_new) print(result)set.seed(42) n <- 200 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(20 * 3), ncol = 3) # Approximating quantile regression with shifted linear models. # In practice, use quantile regression models, e.g.: # quantreg::rq(y ~ ., data = df, tau = 0.05) model_lo <- make_model( train_fun = function(x, y) lm(y ~ ., data = data.frame(y = y, x)), predict_fun = function(obj, x_new) { predict(obj, newdata = as.data.frame(x_new)) - 1.5 }, type = "regression" ) model_hi <- make_model( train_fun = function(x, y) lm(y ~ ., data = data.frame(y = y, x)), predict_fun = function(obj, x_new) { predict(obj, newdata = as.data.frame(x_new)) + 1.5 }, type = "regression" ) result <- conformal_cqr(x, y, model_lo, model_hi, x_new = x_new) print(result)
Constructs prediction intervals using the CV+ method of Barber et al. (2021). Cross-validation residuals and fold-specific models are used to form observation-specific prediction intervals with finite-sample coverage guarantees.
conformal_cv( x, y, model, x_new = NULL, alpha = 0.1, n_folds = 10, verbose = FALSE, seed = NULL )conformal_cv( x, y, model, x_new = NULL, alpha = 0.1, n_folds = 10, verbose = FALSE, seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A numeric vector of response values. |
model |
A fitted model object (e.g., from |
x_new |
A numeric matrix or data frame of new predictor variables.
If |
alpha |
Miscoverage level. Default |
n_folds |
Number of cross-validation folds. Default |
verbose |
Logical. If |
seed |
Optional random seed for reproducible data splitting. |
Unlike basic CV conformal prediction (which computes a single quantile of CV residuals), CV+ constructs intervals that vary per test point. For each test point, every training observation contributes a lower and upper value based on the fold model that excluded that observation, evaluated at the test point, plus or minus the leave-fold-out residual for that observation. The interval bounds are then taken as quantiles of these per-observation values.
The CV+ theoretical coverage guarantee is , not
(Barber et al. 2021, Theorem 2). This is weaker than
split conformal's guarantee. In practice, CV+ coverage
is typically much closer to .
A predictset_reg object. See conformal_split() for details.
The method component is "cv_plus". The object also stores
fold_models (list of K fitted models), fold_ids (integer vector
mapping each observation to its fold), and residuals (leave-fold-out
absolute residuals), which are needed by the predict() method to
compute CV+ intervals for new data.
Barber, R.F., Candes, E.J., Ramdas, A. and Tibshirani, R.J. (2021). Predictive inference with the Jackknife+. Annals of Statistics, 49(1), 486-507. doi:10.1214/20-AOS1965
Other regression methods:
conformal_aci(),
conformal_cqr(),
conformal_jackknife(),
conformal_mondrian(),
conformal_split(),
conformal_weighted()
set.seed(42) n <- 200 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(20 * 3), ncol = 3) result <- conformal_cv(x, y, model = y ~ ., x_new = x_new, n_folds = 5) print(result)set.seed(42) n <- 200 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(20 * 3), ncol = 3) result <- conformal_cv(x, y, model = y ~ ., x_new = x_new, n_folds = 5) print(result)
Constructs prediction intervals using the Jackknife+ method of Barber et al. (2021). Uses leave-one-out models to form prediction intervals with finite-sample coverage guarantees.
conformal_jackknife( x, y, model, x_new = NULL, alpha = 0.1, plus = TRUE, verbose = FALSE, seed = NULL )conformal_jackknife( x, y, model, x_new = NULL, alpha = 0.1, plus = TRUE, verbose = FALSE, seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A numeric vector of response values. |
model |
A fitted model object (e.g., from |
x_new |
A numeric matrix or data frame of new predictor variables.
If |
alpha |
Miscoverage level. Default |
plus |
Logical. If |
verbose |
Logical. If |
seed |
Optional random seed for reproducible data splitting. |
The Jackknife+ method fits n leave-one-out models and uses each model's prediction at the test point, shifted by the corresponding LOO residual, to construct the interval. This is distinct from basic jackknife, which centres a single full-model prediction and adds a quantile of the LOO residuals.
The Jackknife+ theoretical coverage guarantee is , not
(Barber et al. 2021, Theorem 1). This is weaker than
split conformal's guarantee. In practice, Jackknife+
coverage is typically much closer to .
A predictset_reg object. See conformal_split() for details.
The method component is "jackknife_plus" or "jackknife".
Additional components include loo_models (list of n leave-one-out
fitted models) and loo_residuals (numeric vector of LOO absolute
residuals).
Barber, R.F., Candes, E.J., Ramdas, A. and Tibshirani, R.J. (2021). Predictive inference with the jackknife+. Annals of Statistics, 49(1), 486–507.
Other regression methods:
conformal_aci(),
conformal_cqr(),
conformal_cv(),
conformal_mondrian(),
conformal_split(),
conformal_weighted()
set.seed(42) n <- 50 x <- matrix(rnorm(n * 2), ncol = 2) y <- x[, 1] + rnorm(n) x_new <- matrix(rnorm(10 * 2), ncol = 2) result <- conformal_jackknife(x, y, model = y ~ ., x_new = x_new) print(result)set.seed(42) n <- 50 x <- matrix(rnorm(n * 2), ncol = 2) y <- x[, 1] + rnorm(n) x_new <- matrix(rnorm(10 * 2), ncol = 2) result <- conformal_jackknife(x, y, model = y ~ ., x_new = x_new) print(result)
Constructs prediction sets using the Least Ambiguous Classifier (LAC)
method. Includes all classes whose predicted probability exceeds
1 - q, where q is the conformal quantile of 1 - p(true class) scores.
conformal_lac(x, y, model, x_new, alpha = 0.1, cal_fraction = 0.5, seed = NULL)conformal_lac(x, y, model, x_new, alpha = 0.1, cal_fraction = 0.5, seed = NULL)
x |
A numeric matrix or data frame of predictor variables. |
y |
A factor (or character/integer vector coerced to factor) of class labels. |
model |
A |
x_new |
A numeric matrix or data frame of new predictor variables. |
alpha |
Miscoverage level. Default |
cal_fraction |
Fraction of data used for calibration. Default |
seed |
Optional random seed. |
A predictset_class object with components:
A list of character vectors, one per new observation.
A list of named numeric vectors with predicted probabilities for included classes.
The miscoverage level used.
Character string "lac".
Numeric vector of calibration scores.
The conformal quantile used.
Character vector of all class labels.
Number of calibration observations.
Number of training observations.
The fitted model object.
The predictset_model specification.
Sadinle, M., Lei, J. and Wasserman, L. (2019). Least ambiguous set-valued classifiers with bounded error levels. Journal of the American Statistical Association, 114(525), 223-234. doi:10.1080/01621459.2017.1395341
Other classification methods:
conformal_aps(),
conformal_mondrian_class(),
conformal_raps()
set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(ifelse(x[,1] + x[,2] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) result <- conformal_lac(x, y, model = clf, x_new = x_new) print(result)set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(ifelse(x[,1] + x[,2] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) result <- conformal_lac(x, y, model = clf, x_new = x_new) print(result)
Constructs prediction intervals with group-conditional coverage guarantees. Instead of a single conformal quantile, a separate quantile is computed for each group, ensuring coverage within each subgroup (e.g. by gender, region, or model type).
conformal_mondrian( x, y, model, x_new, groups, groups_new, alpha = 0.1, cal_fraction = 0.5, seed = NULL )conformal_mondrian( x, y, model, x_new, groups, groups_new, alpha = 0.1, cal_fraction = 0.5, seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A numeric vector of response values. |
model |
A fitted model object, a |
x_new |
A numeric matrix or data frame of new predictor variables. |
groups |
A factor or character vector of group labels for each
observation in |
groups_new |
A factor or character vector of group labels for each
observation in |
alpha |
Miscoverage level. Default |
cal_fraction |
Fraction of data used for calibration. Default |
seed |
Optional random seed. |
A predictset_reg object. See conformal_split() for details.
The method component is "mondrian". Additional components include
groups_new (the group labels for new data) and group_quantiles
(named numeric vector of per-group conformal quantiles).
Vovk, V., Gammerman, A. and Shafer, G. (2005). Algorithmic Learning in a Random World. Springer.
Other regression methods:
conformal_aci(),
conformal_cqr(),
conformal_cv(),
conformal_jackknife(),
conformal_split(),
conformal_weighted()
set.seed(42) n <- 400 x <- matrix(rnorm(n * 3), ncol = 3) groups <- factor(ifelse(x[, 1] > 0, "high", "low")) y <- x[, 1] * 2 + ifelse(groups == "high", 2, 0.5) * rnorm(n) x_new <- matrix(rnorm(50 * 3), ncol = 3) groups_new <- factor(ifelse(x_new[, 1] > 0, "high", "low")) result <- conformal_mondrian(x, y, model = y ~ ., x_new = x_new, groups = groups, groups_new = groups_new) print(result)set.seed(42) n <- 400 x <- matrix(rnorm(n * 3), ncol = 3) groups <- factor(ifelse(x[, 1] > 0, "high", "low")) y <- x[, 1] * 2 + ifelse(groups == "high", 2, 0.5) * rnorm(n) x_new <- matrix(rnorm(50 * 3), ncol = 3) groups_new <- factor(ifelse(x_new[, 1] > 0, "high", "low")) result <- conformal_mondrian(x, y, model = y ~ ., x_new = x_new, groups = groups, groups_new = groups_new) print(result)
Constructs prediction sets with group-conditional coverage guarantees for classification. Uses LAC-style scoring with per-group conformal quantiles.
conformal_mondrian_class( x, y, model, x_new, groups, groups_new, alpha = 0.1, cal_fraction = 0.5, seed = NULL )conformal_mondrian_class( x, y, model, x_new, groups, groups_new, alpha = 0.1, cal_fraction = 0.5, seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A factor (or character/integer vector coerced to factor) of class labels. |
model |
A |
x_new |
A numeric matrix or data frame of new predictor variables. |
groups |
A factor or character vector of group labels for each
observation in |
groups_new |
A factor or character vector of group labels for each
observation in |
alpha |
Miscoverage level. Default |
cal_fraction |
Fraction of data used for calibration. Default |
seed |
Optional random seed. |
A predictset_class object. See conformal_lac() for
details. The method component is "mondrian". Additional components
include groups_new and group_quantiles.
Other classification methods:
conformal_aps(),
conformal_lac(),
conformal_raps()
set.seed(42) n <- 400 x <- matrix(rnorm(n * 4), ncol = 4) groups <- factor(ifelse(x[, 1] > 0, "high", "low")) y <- factor(ifelse(x[,1] + x[,2] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) groups_new <- factor(ifelse(x_new[, 1] > 0, "high", "low")) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) result <- conformal_mondrian_class(x, y, model = clf, x_new = x_new, groups = groups, groups_new = groups_new) print(result)set.seed(42) n <- 400 x <- matrix(rnorm(n * 4), ncol = 4) groups <- factor(ifelse(x[, 1] > 0, "high", "low")) y <- factor(ifelse(x[,1] + x[,2] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) groups_new <- factor(ifelse(x_new[, 1] > 0, "high", "low")) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) result <- conformal_mondrian_class(x, y, model = clf, x_new = x_new, groups = groups, groups_new = groups_new) print(result)
Computes conformal p-values for new observations given calibration nonconformity scores. The p-value indicates how conforming a new observation is relative to the calibration set.
conformal_pvalue(scores, new_scores)conformal_pvalue(scores, new_scores)
scores |
A numeric vector of calibration nonconformity scores. |
new_scores |
A numeric vector of nonconformity scores for new observations. |
A numeric vector of p-values, one per element of new_scores.
Each p-value is in (0, 1].
Other diagnostics:
conformal_compare(),
coverage(),
coverage_by_bin(),
coverage_by_group(),
interval_width(),
set_size()
# Calibration scores from a conformal split set.seed(42) cal_scores <- abs(rnorm(100)) new_scores <- abs(rnorm(5)) pvals <- conformal_pvalue(cal_scores, new_scores) print(pvals)# Calibration scores from a conformal split set.seed(42) cal_scores <- abs(rnorm(100)) new_scores <- abs(rnorm(5)) pvals <- conformal_pvalue(cal_scores, new_scores) print(pvals)
Constructs prediction sets using the Regularized Adaptive Prediction Sets (RAPS) method of Angelopoulos et al. (2021). Extends APS with a regularization penalty that encourages smaller prediction sets.
conformal_raps( x, y, model, x_new, alpha = 0.1, cal_fraction = 0.5, k_reg = 1, lambda = 0.01, randomize = FALSE, seed = NULL )conformal_raps( x, y, model, x_new, alpha = 0.1, cal_fraction = 0.5, k_reg = 1, lambda = 0.01, randomize = FALSE, seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A factor (or character/integer vector coerced to factor) of class labels. |
model |
A |
x_new |
A numeric matrix or data frame of new predictor variables. |
alpha |
Miscoverage level. Default |
cal_fraction |
Fraction of data used for calibration. Default |
k_reg |
Regularization parameter controlling the number of classes
exempt from the penalty. Default |
lambda |
Regularization strength. Default |
randomize |
Logical. If |
seed |
Optional random seed. |
A predictset_class object. See conformal_lac() for
details. The method component is "raps".
Angelopoulos, A.N., Bates, S., Malik, J. and Jordan, M.I. (2021). Uncertainty sets for image classifiers using conformal prediction. International Conference on Learning Representations. doi:10.48550/arXiv.2009.14193
Other classification methods:
conformal_aps(),
conformal_lac(),
conformal_mondrian_class()
set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(sample(c("A", "B", "C"), n, replace = TRUE)) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = p / 2, B = p / 2, C = 1 - p) }, type = "classification" ) result <- conformal_raps(x, y, model = clf, x_new = x_new, k_reg = 1, lambda = 0.01) print(result)set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(sample(c("A", "B", "C"), n, replace = TRUE)) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = p / 2, B = p / 2, C = 1 - p) }, type = "classification" ) result <- conformal_raps(x, y, model = clf, x_new = x_new, k_reg = 1, lambda = 0.01) print(result)
Constructs prediction intervals using split conformal inference. The data is split into training and calibration sets; nonconformity scores are computed on the calibration set and used to form intervals on new data.
conformal_split( x, y, model, x_new, alpha = 0.1, cal_fraction = 0.5, score_type = c("absolute", "normalized"), scale_model = NULL, seed = NULL )conformal_split( x, y, model, x_new, alpha = 0.1, cal_fraction = 0.5, score_type = c("absolute", "normalized"), scale_model = NULL, seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A numeric vector of response values. |
model |
A fitted model object (e.g., from |
x_new |
A numeric matrix or data frame of new predictor variables for which to compute prediction intervals. |
alpha |
Miscoverage level. Default |
cal_fraction |
Fraction of data used for calibration. Default |
score_type |
Type of nonconformity score. |
scale_model |
A |
seed |
Optional random seed for reproducible data splitting. |
A predictset_reg object (a list) with components:
Numeric vector of point predictions for x_new.
Numeric vector of lower bounds.
Numeric vector of upper bounds.
The miscoverage level used.
Character string "split".
Numeric vector of calibration nonconformity scores.
The conformal quantile used to form intervals.
Number of calibration observations.
Number of training observations.
The fitted model object.
The predictset_model specification.
Lei, J., G'Sell, M., Rinaldo, A., Tibshirani, R.J. and Wasserman, L. (2018). Distribution-free predictive inference for regression. Journal of the American Statistical Association, 113(523), 1094-1111. doi:10.1080/01621459.2017.1307116
Other regression methods:
conformal_aci(),
conformal_cqr(),
conformal_cv(),
conformal_jackknife(),
conformal_mondrian(),
conformal_weighted()
set.seed(42) n <- 200 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(50 * 3), ncol = 3) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) print(result)set.seed(42) n <- 200 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(50 * 3), ncol = 3) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) print(result)
Constructs prediction intervals using weighted split conformal inference, designed for settings with covariate shift where calibration and test data may have different distributions. Importance weights re-weight the calibration scores to account for this shift.
conformal_weighted( x, y, model, x_new, weights = NULL, alpha = 0.1, cal_fraction = 0.5, seed = NULL )conformal_weighted( x, y, model, x_new, weights = NULL, alpha = 0.1, cal_fraction = 0.5, seed = NULL )
x |
A numeric matrix or data frame of predictor variables. |
y |
A numeric vector of response values. |
model |
A fitted model object, a |
x_new |
A numeric matrix or data frame of new predictor variables. |
weights |
A numeric vector of importance weights for each observation
in |
alpha |
Miscoverage level. Default |
cal_fraction |
Fraction of data used for calibration. Default |
seed |
Optional random seed. |
The test-point weight is set to the mean of calibration
weights, following standard practice when the true test weight is unknown.
See Tibshirani et al. (2019), Equation 5.
A predictset_reg object. See conformal_split() for details.
The method component is "weighted".
Tibshirani, R.J., Barber, R.F., Candes, E.J. and Ramdas, A. (2019). Conformal prediction under covariate shift. Advances in Neural Information Processing Systems, 32.
Other regression methods:
conformal_aci(),
conformal_cqr(),
conformal_cv(),
conformal_jackknife(),
conformal_mondrian(),
conformal_split()
set.seed(42) n <- 400 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(50 * 3, mean = 1), ncol = 3) weights <- rep(1, n) result <- conformal_weighted(x, y, model = y ~ ., x_new = x_new, weights = weights) print(result)set.seed(42) n <- 400 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(50 * 3, mean = 1), ncol = 3) weights <- rep(1, n) result <- conformal_weighted(x, y, model = y ~ ., x_new = x_new, weights = weights) print(result)
Computes the fraction of true values that fall within the prediction intervals (regression) or prediction sets (classification).
coverage(object, y_true) ## S3 method for class 'predictset_reg' coverage(object, y_true) ## S3 method for class 'predictset_class' coverage(object, y_true)coverage(object, y_true) ## S3 method for class 'predictset_reg' coverage(object, y_true) ## S3 method for class 'predictset_class' coverage(object, y_true)
object |
A |
y_true |
A numeric vector (regression) or factor/character vector (classification) of true values, with the same length as the number of predictions. |
A single numeric value between 0 and 1 representing the empirical coverage rate.
Other diagnostics:
conformal_compare(),
conformal_pvalue(),
coverage_by_bin(),
coverage_by_group(),
interval_width(),
set_size()
set.seed(42) n <- 500 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(100 * 3), ncol = 3) y_new <- x_new[, 1] * 2 + rnorm(100) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) coverage(result, y_new)set.seed(42) n <- 500 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(100 * 3), ncol = 3) y_new <- x_new[, 1] * 2 + rnorm(100) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) coverage(result, y_new)
Bins predictions into quantile-based groups and computes coverage within each bin. Useful for detecting systematic under- or over-coverage as a function of predicted value.
coverage_by_bin(object, y_true, bins = 10)coverage_by_bin(object, y_true, bins = 10)
object |
A |
y_true |
A numeric vector of true response values. |
bins |
Number of bins. Default |
A data frame with columns bin, coverage, n, and mean_width.
Other diagnostics:
conformal_compare(),
conformal_pvalue(),
coverage(),
coverage_by_group(),
interval_width(),
set_size()
set.seed(42) n <- 500 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(200 * 3), ncol = 3) y_new <- x_new[, 1] * 2 + rnorm(200) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) coverage_by_bin(result, y_new, bins = 5)set.seed(42) n <- 500 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(200 * 3), ncol = 3) y_new <- x_new[, 1] * 2 + rnorm(200) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) coverage_by_bin(result, y_new, bins = 5)
Computes empirical coverage within each group, useful for diagnosing conditional coverage violations.
coverage_by_group(object, y_true, groups)coverage_by_group(object, y_true, groups)
object |
A |
y_true |
True values (numeric for regression, factor/character for classification). |
groups |
A factor or character vector of group labels with the same length as the number of predictions. |
A data frame with columns group, coverage, n, and target.
Other diagnostics:
conformal_compare(),
conformal_pvalue(),
coverage(),
coverage_by_bin(),
interval_width(),
set_size()
set.seed(42) n <- 500 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(200 * 3), ncol = 3) y_new <- x_new[, 1] * 2 + rnorm(200) groups <- factor(ifelse(x_new[, 1] > 0, "high", "low")) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) coverage_by_group(result, y_new, groups)set.seed(42) n <- 500 x <- matrix(rnorm(n * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(n) x_new <- matrix(rnorm(200 * 3), ncol = 3) y_new <- x_new[, 1] * 2 + rnorm(200) groups <- factor(ifelse(x_new[, 1] > 0, "high", "low")) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) coverage_by_group(result, y_new, groups)
Returns the width of each prediction interval.
interval_width(object)interval_width(object)
object |
A |
A numeric vector of interval widths.
Other diagnostics:
conformal_compare(),
conformal_pvalue(),
coverage(),
coverage_by_bin(),
coverage_by_group(),
set_size()
set.seed(42) x <- matrix(rnorm(200 * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(200) x_new <- matrix(rnorm(50 * 3), ncol = 3) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) widths <- interval_width(result) summary(widths)set.seed(42) x <- matrix(rnorm(200 * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(200) x_new <- matrix(rnorm(50 * 3), ncol = 3) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) widths <- interval_width(result) summary(widths)
Defines how to train a model and generate predictions, allowing any model to be used with conformal prediction methods.
make_model(train_fun, predict_fun, type = c("regression", "classification"))make_model(train_fun, predict_fun, type = c("regression", "classification"))
train_fun |
A function with signature |
predict_fun |
A function with signature |
type |
Character string, either |
A predictset_model object (a list with components train_fun,
predict_fun, and type).
reg_model <- make_model( train_fun = function(x, y) lm(y ~ ., data = data.frame(y = y, x)), predict_fun = function(object, x_new) { predict(object, newdata = as.data.frame(x_new)) }, type = "regression" )reg_model <- make_model( train_fun = function(x, y) lm(y ~ ., data = data.frame(y = y, x)), predict_fun = function(object, x_new) { predict(object, newdata = as.data.frame(x_new)) }, type = "regression" )
Creates a two-panel base R plot. The top panel shows prediction intervals over time; the bottom panel shows the adaptive alpha trace.
## S3 method for class 'predictset_aci' plot(x, max_points = 500, ...)## S3 method for class 'predictset_aci' plot(x, max_points = 500, ...)
x |
A |
max_points |
Maximum number of points to display. Default |
... |
Additional arguments (currently unused). |
The input object, invisibly.
set.seed(42) n <- 100 y_true <- cumsum(rnorm(n, sd = 0.1)) + rnorm(n) y_pred <- c(0, y_true[-n]) result <- conformal_aci(y_pred, y_true, alpha = 0.10, gamma = 0.01) plot(result)set.seed(42) n <- 100 y_true <- cumsum(rnorm(n, sd = 0.1)) + rnorm(n) y_pred <- c(0, y_true[-n]) result <- conformal_aci(y_pred, y_true, alpha = 0.10, gamma = 0.01) plot(result)
Creates a barplot showing the distribution of prediction set sizes.
## S3 method for class 'predictset_class' plot(x, ...)## S3 method for class 'predictset_class' plot(x, ...)
x |
A |
... |
Additional arguments passed to |
The input object, invisibly.
set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(ifelse(x[,1] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) result <- conformal_lac(x, y, model = clf, x_new = x_new) plot(result)set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(ifelse(x[,1] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) result <- conformal_lac(x, y, model = clf, x_new = x_new) plot(result)
Creates a base R plot showing prediction intervals. Points are ordered by predicted value, with intervals shown as vertical segments.
## S3 method for class 'predictset_reg' plot(x, max_points = 200, ...)## S3 method for class 'predictset_reg' plot(x, max_points = 200, ...)
x |
A |
max_points |
Maximum number of points to display. Default |
... |
Additional arguments passed to |
The input object, invisibly.
set.seed(42) x <- matrix(rnorm(200 * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(200) x_new <- matrix(rnorm(50 * 3), ncol = 3) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) plot(result)set.seed(42) x <- matrix(rnorm(200 * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(200) x_new <- matrix(rnorm(50 * 3), ncol = 3) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) plot(result)
Generate prediction sets for new data using a fitted conformal prediction object.
## S3 method for class 'predictset_class' predict(object, newdata, ...)## S3 method for class 'predictset_class' predict(object, newdata, ...)
object |
A |
newdata |
A numeric matrix or data frame of new predictor variables. |
... |
Additional arguments. For Mondrian objects, pass
|
A predictset_class object with updated sets and probabilities.
set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(ifelse(x[,1] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) result <- conformal_lac(x, y, model = clf, x_new = x_new) preds <- predict(result, newdata = matrix(rnorm(5 * 4), ncol = 4))set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(ifelse(x[,1] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) result <- conformal_lac(x, y, model = clf, x_new = x_new) preds <- predict(result, newdata = matrix(rnorm(5 * 4), ncol = 4))
Generate prediction intervals for new data using a fitted conformal prediction object.
## S3 method for class 'predictset_reg' predict(object, newdata, ...)## S3 method for class 'predictset_reg' predict(object, newdata, ...)
object |
A |
newdata |
A numeric matrix or data frame of new predictor variables. |
... |
Additional arguments. For Mondrian objects, pass
|
A data frame with columns pred, lower, and upper.
set.seed(42) x <- matrix(rnorm(200 * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(200) x_new <- matrix(rnorm(10 * 3), ncol = 3) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) preds <- predict(result, newdata = matrix(rnorm(5 * 3), ncol = 3))set.seed(42) x <- matrix(rnorm(200 * 3), ncol = 3) y <- x[, 1] * 2 + rnorm(200) x_new <- matrix(rnorm(10 * 3), ncol = 3) result <- conformal_split(x, y, model = y ~ ., x_new = x_new) preds <- predict(result, newdata = matrix(rnorm(5 * 3), ncol = 3))
Print Method for ACI Objects
## S3 method for class 'predictset_aci' print(x, ...)## S3 method for class 'predictset_aci' print(x, ...)
x |
A |
... |
Additional arguments (currently unused). |
The input object, invisibly.
Print Method for Classification Conformal Objects
## S3 method for class 'predictset_class' print(x, ...)## S3 method for class 'predictset_class' print(x, ...)
x |
A |
... |
Additional arguments (currently unused). |
The input object, invisibly.
Print Method for Model Specifications
## S3 method for class 'predictset_model' print(x, ...)## S3 method for class 'predictset_model' print(x, ...)
x |
A |
... |
Additional arguments (currently unused). |
The input object, invisibly.
Print Method for Regression Conformal Objects
## S3 method for class 'predictset_reg' print(x, ...)## S3 method for class 'predictset_reg' print(x, ...)
x |
A |
... |
Additional arguments (currently unused). |
The input object, invisibly.
Returns the number of classes in each prediction set.
set_size(object)set_size(object)
object |
A |
An integer vector of set sizes.
Other diagnostics:
conformal_compare(),
conformal_pvalue(),
coverage(),
coverage_by_bin(),
coverage_by_group(),
interval_width()
set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(ifelse(x[,1] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) result <- conformal_lac(x, y, model = clf, x_new = x_new) sizes <- set_size(result) table(sizes)set.seed(42) n <- 300 x <- matrix(rnorm(n * 4), ncol = 4) y <- factor(ifelse(x[,1] > 0, "A", "B")) x_new <- matrix(rnorm(50 * 4), ncol = 4) clf <- make_model( train_fun = function(x, y) glm(y ~ ., data = data.frame(y = y, x), family = "binomial"), predict_fun = function(object, x_new) { df <- as.data.frame(x_new) names(df) <- paste0("X", seq_len(ncol(x_new))) p <- predict(object, newdata = df, type = "response") cbind(A = 1 - p, B = p) }, type = "classification" ) result <- conformal_lac(x, y, model = clf, x_new = x_new) sizes <- set_size(result) table(sizes)
Summary Method for Classification Conformal Objects
## S3 method for class 'predictset_class' summary(object, ...)## S3 method for class 'predictset_class' summary(object, ...)
object |
A |
... |
Additional arguments (currently unused). |
The input object, invisibly.
Summary Method for Regression Conformal Objects
## S3 method for class 'predictset_reg' summary(object, ...)## S3 method for class 'predictset_reg' summary(object, ...)
object |
A |
... |
Additional arguments (currently unused). |
The input object, invisibly.