Skip to contents

Returns the width of each prediction interval.

Usage

interval_width(object)

Arguments

object

A predictset_reg object.

Value

A numeric vector of interval widths.

Examples

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)
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>   2.983   2.983   2.983   2.983   2.983   2.983