Block Length Sampler

class tsbootstrap.block_length_sampler.BlockLengthSampler(avg_block_length: Integral = 2, block_length_distribution: str | None = None, rng: Generator | Integral | None = None)[source]

A class for sampling block lengths for the random block length bootstrap.

sample_block_length()[source]

Sample a block length from the selected distribution.

property avg_block_length

Getter for avg_block_length.

property block_length_distribution: str

Getter for block_length_distribution.

property rng: Generator

Getter for rng.

sample_block_length() int[source]

Sample a block length from the selected distribution.

Returns:

A sampled block length.

Return type:

int