pub enum ResamplingPlan {
IidBootstrap,
BayesianBootstrap,
MovingBlock {
length: usize,
},
CircularBlock {
length: usize,
},
ClusterBootstrap {
cluster: VariableId,
},
StationaryBlock {
expected_length: f64,
},
Permutation(PermutationScheme),
}Expand description
Resampling plan producing row-index or weight replicates.
Variants§
IidBootstrap
IID with-replacement row bootstrap.
BayesianBootstrap
Bayesian bootstrap: Dirichlet(1,…,1) observation weights (Rubin).
MovingBlock
Moving-block bootstrap (contiguous blocks).
CircularBlock
Circular block bootstrap (wraps the series).
ClusterBootstrap
Cluster bootstrap (resample whole clusters; ids via grouped fill).
cluster names the variable whose labels are supplied as cluster_ids
to the fill helpers (labels remain caller-resolved).
Fields
cluster: VariableIdVariable that holds cluster membership labels.
StationaryBlock
Stationary block bootstrap (Politis–Romano geometric lengths).
Permutation(PermutationScheme)
Permutation (shuffle) index plan.
Implementations§
Source§impl ResamplingPlan
impl ResamplingPlan
Sourcepub const fn is_weight_plan(self) -> bool
pub const fn is_weight_plan(self) -> bool
Whether this plan yields observation weights rather than row indexes.
Sourcepub const fn needs_clusters(self) -> bool
pub const fn needs_clusters(self) -> bool
Whether this plan requires per-row cluster labels.
Sourcepub const fn cluster_variable(self) -> Option<VariableId>
pub const fn cluster_variable(self) -> Option<VariableId>
Cluster variable recorded on ResamplingPlan::ClusterBootstrap, if any.
Trait Implementations§
Source§impl Clone for ResamplingPlan
impl Clone for ResamplingPlan
Source§fn clone(&self) -> ResamplingPlan
fn clone(&self) -> ResamplingPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more