create_S_b_matrix: Create the "S" matrix and "b" vector

Description Usage Arguments Details Value

View source: R/conformal_pdf_approach.R

Description

An internal function that create the "S" matrix and "b" vector for the "conformal pdf".

Usage

1
create_S_b_matrix(n, prob_cde, prime = FALSE)

Arguments

n

number of observations in the calibration set

prob_cde

P(y: f(y|x) \in [lambda_{i}, lambda_{i+1}) vector. See details for more information.

prime

boolean if we should return S' and b'

Details

The S matrix is a the upper triangle, where the non-zero values have column information that is P(y: f(y|x) \in [lambda_{i}, lambda_{i+1}) where λ_{i} are the level set ups associated with conformal scores values.

The b vector is just (i-1)/n

Value

list of S matrix and b vector.


benjaminleroy/simulationBands documentation built on Dec. 19, 2021, 8:41 a.m.