| .bf_constrained_flat_update | R Documentation |
Solves for flat coefficients subject to the residual equality constraint imposed by the full constraint system, conditional on the current spline block solution.
.bf_constrained_flat_update(
XfWXf_pen,
Xfr,
A_full,
constraint_values,
beta_spline,
flat_rows_all,
spline_rows_all,
spline_cols,
flat_cols,
p_expansions,
K,
nc_flat
)
XfWXf_pen |
Penalized flat Gram matrix
( |
Xfr |
Right-hand side cross-product for flat update
( |
A_full |
Full constraint matrix ( |
constraint_values |
List of constraint RHS vectors. |
beta_spline |
List of |
flat_rows_all |
Integer vector of flat row indices in the full P-space. |
spline_rows_all |
Integer vector of spline row indices in the full P-space. |
spline_cols |
Integer vector of spline column indices within each partition. |
flat_cols |
Integer vector of flat column indices within each partition. |
p_expansions |
Integer; columns per partition. |
K |
Integer; number of interior knots. |
nc_flat |
Integer; number of flat columns. |
When the full constraint system is \mathbf{A}^\top \boldsymbol{\beta} = \mathbf{c},
and we partition \boldsymbol{\beta} into spline and flat blocks, the flat
update must satisfy:
\mathbf{A}_{\mathrm{flat}}^\top \boldsymbol{\beta}_{\mathrm{flat}}
= \mathbf{c} - \mathbf{A}_{\mathrm{spline}}^\top \boldsymbol{\beta}_{\mathrm{spline}}
This function solves the penalized least-squares problem for flat coefficients subject to this residual equality constraint using a Lagrangian approach.
Numeric vector of flat coefficients (nc_f \times 1).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.