dot-check_kkt_partitionwise: Check KKT Conditions for Partition-Wise Active-Set Method

.check_kkt_partitionwiseR Documentation

Check KKT Conditions for Partition-Wise Active-Set Method

Description

Given current constrained coefficient estimates and a set of active inequality constraints (treated as equalities in the last Lagrangian projection), checks primal feasibility of inactive constraints and dual feasibility (non-negative multipliers) of active constraints.

Usage

.check_kkt_partitionwise(
  result,
  Ghalf,
  GhalfInv,
  Xy_or_uncon,
  is_path3,
  A_aug,
  n_eq_orig,
  qp_Amat,
  qp_bvec,
  active_ineq,
  K,
  p_expansions,
  family,
  parallel_matmult,
  parallel_aga,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks,
  tol,
  parallel_qr = FALSE
)

Arguments

result

List of K+1 coefficient column vectors.

Ghalf

List of \mathbf{G}^{1/2}_k matrices.

GhalfInv

List of \mathbf{G}^{-1/2}_k matrices.

Xy_or_uncon

Either the list of cross-products \mathbf{X}_k^{\top}\mathbf{y}_k (Path 2) or unconstrained estimates (Path 3).

is_path3

Logical; if TRUE, Xy_or_uncon contains unconstrained estimates and GhalfInv is used for transformation.

A_aug

Augmented constraint matrix (original A plus active inequality columns).

n_eq_orig

Integer; number of original equality constraints (columns of A before augmentation).

qp_Amat

Full inequality constraint matrix.

qp_bvec

Full inequality constraint RHS.

active_ineq

Integer vector; indices into columns of qp_Amat that are currently active.

K, p_expansions

Integer dimensions.

family

GLM family object.

parallel_matmult, parallel_aga

Logical flags.

cl, chunk_size, num_chunks, rem_chunks

Parallel parameters.

tol

Numeric tolerance for feasibility and multiplier checks.

Details

Multipliers for active inequality constraints are recovered from the OLS fit used in the Lagrangian projection: the fitted coefficients on \mathbf{X}^* = \mathbf{G}^{1/2}\mathbf{A}_{\mathrm{aug}} give the Lagrangian multipliers (up to sign and scaling).

Value

A list with components:

feasible

Logical; TRUE if all inactive inequality constraints are satisfied within tolerance.

dual_feasible

Logical; TRUE if all active inequality multipliers are non-negative within tolerance.

violated

Integer vector; indices of violated inactive constraints (into qp_Amat columns).

drop

Integer vector; indices of active constraints with negative multipliers that should be dropped.

multipliers

Numeric vector of Lagrangian multipliers for the active inequality constraints.


lgspline documentation built on Aug. 5, 2026, 1:10 a.m.