predict.predictionBands: Compute conformal prediction bands based on density...

Description Usage Arguments Value Examples

View source: R/base_functions.R

Description

Compute conformal prediction bands based on density estimation on new samples

Usage

1
2
## S3 method for class 'predictionBands'
predict(cd_split_fit, xnew, type = "dist", alpha = 0.1)

Arguments

cd_split_fit

# Object of the class predictionBands, fitted using function fit_predictionBands

xnew

# new covariates (one per row) where prediction bands are to be computed

type

# type of prediction bands. dist for 'dist-split' and cd for 'cd-split'.

alpha

# Miscoverage level (defaults to 10%)

Value

Object of the class 'bands' with the following components:

y_grid

Grid of values for y

densities

Matrix where each row contains the estimated density of the corresponding row of xnew on each value of y_grid

ths

thresholds agains which to compare conformal scores.

prediction_bands_which_belong

List with logical values with the same size as nrow(xnew); each element contains shows which elements of y_grid are contained on the prediction bands of the corresponding row of xnew

intervals

List with the same size as nrow(xnew) that contains the prediction bands for each element of xnew. For cd-split, results are shown as a union of disjoint intervals.

type

Type of prediction band

alpha

Miscoverage level

Examples

1

rizbicki/predictionBands documentation built on July 29, 2021, 2:01 a.m.