Expand description
Joint (cross-block) penalty specifications.
After the T^T S_j T pullback used by the V+M / SMGS-exact compile path,
a single penalty S_j no longer has its nonzero region confined to one
ParameterBlockSpec: the pullback by the inter-block coupling matrix T
distributes weight across the entire compiled parameter vector. The
existing ParameterBlockSpec.penalties: Vec<PenaltyMatrix> model encodes
a per-block-local penalty (its dim equals the owning block’s column count),
so it cannot represent these full-width operators.
JointPenaltySpec is the carrier for that case: one dense
total_compiled × total_compiled matrix with its own initial smoothing
parameter and structural nullspace dimension. It lives alongside, not
inside, the per-block specs.
§Inner-solve integration
inner_blockwise_fit and the joint-Newton kernels in custom_family
consume ordinary block-local penalties as a &[Array2<f64>] paired with
per-block (start, end) ranges:
apply_joint_block_penalty_into(ranges, s_lambdas, …)(≈ line 19960)joint_penalty_preconditioner_diag(…)(≈ line 20067)add_joint_penalty_to_matrix(matrix, ranges, s_lambdas, …)(≈ line 20132)
A cross-block dense S has no single owning block range, so the solver also
threads a JointPenaltyBundle through those helpers as a full-width path
that:
- computes
S · vas a fulltotal × totalmat-vec (cf.fast_av), - accumulates
diag(S)into the Jacobi preconditioner over the full parameter vector, and - adds
λ · Sto the dense joint Hessian without slicing.
The remaining construction-site work is to produce the correct
JointPenaltySpec instances for each coupled-family compile path; once a
bundle is supplied through BlockwiseFitOptions::joint_penalties, the inner
solve consumes its objective, mat-vec, preconditioner, and dense-Hessian
contributions.
Structs§
- Joint
Penalty Bundle - Per-evaluation bundle of cross-block penalties paired with their current log-smoothing parameters.
- Joint
Penalty Spec - A penalty whose support spans the entire compiled parameter vector.
Enums§
- Joint
Penalty Error - Reason a
JointPenaltySpecfailed validation.