| .active_set_refine | R Documentation |
Replaces the dense .qp_refine SQP loop with a partition-wise
active-set method that reuses the existing Lagrangian projection
machinery. The key insight is that an active inequality constraint
can be treated as an additional equality constraint and absorbed into
the augmented constraint matrix \mathbf{A}_{\mathrm{aug}},
after which the standard \mathbf{G}^{1/2}\mathbf{r}^* trick
applies without ever forming the full P \times P information
matrix.
.active_set_refine(
result,
X,
y,
K,
p_expansions,
A,
R_constraints,
constraint_value_vectors,
Lambda,
Ghalf,
GhalfInv,
family,
qp_Amat,
qp_bvec,
qp_meq,
Xy_or_uncon,
is_path3,
parallel_aga,
parallel_matmult,
cl,
chunk_size,
num_chunks,
rem_chunks,
tol,
parallel_qr = FALSE,
max_as_iter = NULL,
initial_active_ineq = integer(0)
)
result |
List of current coefficient column vectors by partition. |
X, y |
Lists of partition-specific design matrices and responses. |
K, p_expansions |
Integer dimensions. |
A |
Original equality constraint matrix. |
R_constraints |
Number of columns of |
constraint_value_vectors |
Constraint RHS list. |
Lambda |
Shared penalty matrix. |
Ghalf, GhalfInv |
Lists of |
family |
GLM family object. |
qp_Amat |
Inequality constraint matrix. |
qp_bvec |
Inequality constraint RHS. |
qp_meq |
Number of equality constraints within |
Xy_or_uncon |
Cross-products (Path 2) or unconstrained estimates (Path 3). |
is_path3 |
Logical. |
parallel_aga, parallel_matmult |
Logical flags. |
cl, chunk_size, num_chunks, rem_chunks |
Parallel parameters. |
tol |
Convergence tolerance. |
max_as_iter |
Maximum active-set iterations (default 50). |
initial_active_ineq |
Integer vector of inequality columns used as the initial working set. |
The active-set loop:
Solve the equality-constrained subproblem (Lagrangian projection) with current active set.
Check primal feasibility: any violated inactive inequalities?
Check dual feasibility: any negative multipliers on active inequalities?
If both satisfied, return (KKT conditions met).
Otherwise, add most-violated constraint or drop most-negative multiplier, and repeat.
Falls back to .qp_refine if the active-set method does not
converge within max_as_iter iterations.
A list with components:
List of refined coefficient column vectors by partition.
List with active constraint information, or NULL.
Logical; TRUE if active-set method converged.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.