pub struct OdpBootstrapOptions {
pub iterations: usize,
pub seed: u64,
pub residual_adjustment: ResidualAdjustment,
pub process_distribution: ProcessDistribution,
pub center_residuals: bool,
pub monotonicity_policy: MonotonicityPolicy,
}Expand description
Full configuration for bootstrap_odp.
Fields§
§iterations: usizeNumber of bootstrap iterations.
seed: u64Deterministic PRNG seed.
residual_adjustment: ResidualAdjustmentResidual scaling convention (degrees of freedom vs. hat-matrix leverage).
process_distribution: ProcessDistributionProcess-variance distribution for future cells.
center_residuals: boolWhether to center the eligible adjusted residual pool to zero mean before resampling (Shapland 2016, §3.4.3).
monotonicity_policy: MonotonicityPolicyMonotonicity policy for triangle validation.
Implementations§
Source§impl OdpBootstrapOptions
impl OdpBootstrapOptions
Sourcepub const fn england_verrall(iterations: usize, seed: u64) -> Self
pub const fn england_verrall(iterations: usize, seed: u64) -> Self
Classic England & Verrall (1999, 2002) specification: global
sqrt(N / (N - p)) residual scaling, Gamma process variance, uncentered.
Sourcepub const fn shapland(iterations: usize, seed: u64) -> Self
pub const fn shapland(iterations: usize, seed: u64) -> Self
Shapland (2016, CAS Monograph 4) practitioner specification: exact
hat-matrix leverage 1 / sqrt(1 - h_{ii}), centered eligible pool,
Gamma process variance.
Sourcepub const fn with_iterations(self, iterations: usize) -> Self
pub const fn with_iterations(self, iterations: usize) -> Self
Set the number of bootstrap iterations.
Sourcepub const fn with_residual_adjustment(
self,
adjustment: ResidualAdjustment,
) -> Self
pub const fn with_residual_adjustment( self, adjustment: ResidualAdjustment, ) -> Self
Set the residual adjustment convention (DegreesOfFreedom vs. HatMatrixLeverage).
Sourcepub const fn with_process_distribution(self, dist: ProcessDistribution) -> Self
pub const fn with_process_distribution(self, dist: ProcessDistribution) -> Self
Set the future process-variance distribution (Gamma, OverDispersedPoisson, or None).
Sourcepub const fn with_centered_residuals(self, center: bool) -> Self
pub const fn with_centered_residuals(self, center: bool) -> Self
Enable or disable centering the eligible adjusted residual pool before resampling.
Sourcepub const fn with_policy(self, policy: MonotonicityPolicy) -> Self
pub const fn with_policy(self, policy: MonotonicityPolicy) -> Self
Set the triangle monotonicity policy.