stepwise_conformal_cde_update: stepwise transform of CDE to become comformal

Description Usage Arguments Details Value

View source: R/conformal_pdf_approach.R

Description

Solving for the x in the following general equation

\min_{x, z} 1/2(Sx-b)^T(Sx-b) + λ (α z^Tz + (1-α) 1^Tz)

subject to some of the following equations

A_1: & z_i ≥q x_i - x_{i+1} \ A_2: & z_i ≥q - x_i + x_{i+1} \ A_3: & x_i ≥q 0 \ A_4: & x_i - x_{i+1} ≥q 0 \

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
stepwise_conformal_cde_update(
  n,
  prob_cde,
  lambda = -1,
  alpha = 0,
  monotonically_increasing = F,
  delta = 1e-12,
  scaling_constraint = F,
  prime = FALSE
)

Arguments

n

number of conformal values (length of prob_cde - 1)

prob_cde

vector of mass of probability (defined by fitted density) between each conformal based level grouping

lambda

optimization constraint (weight for smoothing)

alpha

elasticnet penalty (recommend default at 0)

monotonically_increasing

constraint to require scaling to increase (recommend default at FALSE)

delta

stabilizing constant (added to diagonal if needed)

scaling_constraint

boolean if we add a constraint to make sure that the final density has mass 1 (currently set at FALSE - but not for a good reason).

prime

boolean if we should return S' and b'

Details

With A_1, A_2, A_3 constraints for monotonically_increasing is FALSE and A_1, A_3, A_4 if monotonically_increasing is TRUE.

Value

solution of above equation


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