Skip to main content

auto_outer_score_subsample

Function auto_outer_score_subsample 

Source
pub fn auto_outer_score_subsample(
    z: &[f64],
    stratum_secondary: Option<&[u8]>,
    options: &AutoOuterSubsampleOptions,
) -> Option<OuterScoreSubsample>
Expand description

Build a stratified outer-score subsample automatically from problem characteristics. Returns None for problems too small to benefit (the caller should fall back to the full-data path).

Stratification matches build_outer_score_subsample: 100 z-deciles × the supplied secondary stratum (typically the {0, 1} response indicator). When stratum_secondary is None the secondary dimension collapses to a single bin.

The returned mask carries proper Horvitz–Thompson weights so that Σ_{i ∈ mask} weight_i · row_i is an unbiased estimate of the full row sum.