Expand description
Row-subsample mask handle for trust-region invariant enforcement.
A RowSubsampleMask is the explicit identity of the set of rows + per-row
weights used to evaluate any one of {Hessian, gradient, objective}
during a single inner trust-region iteration. The trust-region
globalization computes
ρ = actual_reduction / predicted_reduction = [F(β) − F(β + δ)] / [−g·δ − ½·δᵀHδ]
and accepts/rejects the step from ρ. All four quantities (F(β), F(β + δ), g, H) MUST be evaluated against the same row measure for ρ to be meaningful; otherwise the numerator and denominator estimate different objectives and ρ can take any sign, producing the observed ρ = -0.05 with predicted_reduction = +7.378e6 sign flip.
RowSubsampleMask::id is a stable 64-bit content hash: equal masks
(Arc<OuterScoreSubsample> pointer equality OR identical mask
contents) ⇒ equal ids; differing masks ⇒ differing ids with high
probability. The TR loop captures one RowSubsampleMask at the top of an
iteration and hard-asserts that the id observed by each of the four
quantities matches before computing ρ.
The BlockwiseFitOptions-coupled from_options constructor stays up in
gam-solve (it depends on the options type, which lives above this tier);
the data type and its pure data methods live here so lower tiers can
consume the measure without depending on gam-solve.
Structs§
- RowSubsample
Mask - Identifier-carrying handle for a single row subsample mask.