bootstrap()
- tsbootstrap.bootstrap(X: object, *, method: BaseMethodSpec, n_bootstraps: int = 999, random_state: int | Generator | SeedSequence | None = None, exog: object | None = None) BootstrapResult[source]
Generate bootstrap replicates of a time series.
- Parameters:
X (array-like) – Observations, shape
(n,)or(n, d).method (BaseMethodSpec) – A method spec (e.g.
MovingBlock(block_length="auto")).n_bootstraps (int, default 999) – Number of replicates.
random_state (int | numpy Generator | SeedSequence | None) – Reproducibility seed. Replicate
iis bound to its own generator, so results are reproducible for a given seed and environment (OS, hardware, BLAS, NumPy), as with NumPy/scikit-learn.exog (array-like or None) – Optional exogenous regressors, shape
(n,)or(n, k), aligned withX, held fixed during regeneration. Supported forResidualBootstrapwith anAR(ARX),VAR(VARX), orARIMA(ARIMAX) model, and forSieveAR. ARX/VARX requireinitial="fixed"andburn_in=0(the exog must align with each step); ARIMAX has no such constraint (exog enters at the level after inverse-differencing).
- Returns:
Sequence of
BootstrapSampleplus metadata.- Return type: