condense_support_points

Function condense_support_points 

Source
pub fn condense_support_points(
    theta: &Theta,
    psi: &Psi,
    lambda: &Weights,
    lambda_threshold: f64,
    qr_threshold: f64,
) -> Result<(Theta, Psi, Weights, f64)>
Expand description

Apply lambda filtering and QR decomposition to condense support points

This implements the condensation step used in NPAG algorithms:

  1. Filter support points by lambda (probability) threshold
  2. Apply QR decomposition to remove linearly dependent points
  3. Recalculate weights with Burke’s IPM on filtered points

§Arguments

  • theta - Support points matrix
  • psi - Likelihood matrix (subjects × support points)
  • lambda - Initial probability weights for support points
  • lambda_threshold - Minimum lambda value (relative to max) to keep a point
  • qr_threshold - QR decomposition threshold for linear independence (typically 1e-8)

§Returns

Returns filtered theta, psi, and recalculated weights, plus the objective function value