{ "cells": [ { "cell_type": "markdown", "id": "fbb592c1", "metadata": {}, "source": [ "# Cheat sheet: pick your bootstrap\n", "\n", "A scannable reference for choosing a `tsbootstrap` method. The capability\n", "table below is built from the library's own metadata, so it cannot drift\n", "from the code. The decision tree summarizes when each family applies.\n", "\n", "For the programmatic version of this table, see `diagnose`, which inspects\n", "your data and recommends methods. For the worked rationale behind each\n", "choice, see the which-bootstrap-when tutorial." ] }, { "cell_type": "code", "execution_count": 1, "id": "49c4460b", "metadata": { "execution": { "iopub.execute_input": "2026-06-22T16:14:32.240792Z", "iopub.status.busy": "2026-06-22T16:14:32.240620Z", "iopub.status.idle": "2026-06-22T16:14:33.257364Z", "shell.execute_reply": "2026-06-22T16:14:33.255236Z" } }, "outputs": [], "source": [ "# On Colab or Binder, install tsbootstrap first (skipped if already present):\n", "try:\n", " import tsbootstrap # noqa: F401\n", "except ImportError:\n", " %pip install -q \"tsbootstrap[examples]\"" ] }, { "cell_type": "markdown", "id": "fc712a98", "metadata": {}, "source": [ "## The capability table\n", "\n", "One row per method, read straight from `tsbootstrap.metadata.METHODS` and the\n", "spec classes in `tsbootstrap.methods`. The block-length column reports the\n", "actual parameter name on each spec (most use `block_length`; the stationary\n", "bootstrap uses `avg_block_length`; model-based methods have none)." ] }, { "cell_type": "code", "execution_count": 2, "id": "1fe6d919", "metadata": { "execution": { "iopub.execute_input": "2026-06-22T16:14:33.261286Z", "iopub.status.busy": "2026-06-22T16:14:33.260755Z", "iopub.status.idle": "2026-06-22T16:14:33.462634Z", "shell.execute_reply": "2026-06-22T16:14:33.461210Z" } }, "outputs": [ { "data": { "text/html": [ "
| \n", " | spec | \n", "serial dependence | \n", "marginal | \n", "block-length param | \n", "wraps around | \n", "multivariate | \n", "OOB | \n", "recommended for | \n", "
|---|---|---|---|---|---|---|---|---|
| method | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
| iid | \n", "IID | \n", "no | \n", "empirical | \n", "none | \n", "no | \n", "yes | \n", "yes | \n", "i.i.d. data with no serial dependence; baseline | \n", "
| moving_block | \n", "MovingBlock | \n", "yes | \n", "empirical | \n", "block_length | \n", "no | \n", "yes | \n", "yes | \n", "stationary, weakly dependent series; distribut... | \n", "
| circular_block | \n", "CircularBlock | \n", "yes | \n", "empirical | \n", "block_length | \n", "yes | \n", "yes | \n", "yes | \n", "stationary, weakly dependent series; distribut... | \n", "
| stationary_block | \n", "StationaryBlock | \n", "yes | \n", "empirical | \n", "avg_block_length | \n", "no | \n", "yes | \n", "yes | \n", "stationary, weakly dependent series; distribut... | \n", "
| non_overlapping_block | \n", "NonOverlappingBlock | \n", "yes | \n", "empirical | \n", "block_length | \n", "no | \n", "yes | \n", "yes | \n", "stationary, weakly dependent series; distribut... | \n", "
| tapered_block | \n", "TaperedBlock | \n", "yes | \n", "empirical | \n", "block_length | \n", "no | \n", "yes | \n", "yes | \n", "stationary, weakly dependent series; distribut... | \n", "
| residual | \n", "ResidualBootstrap | \n", "yes | \n", "model-implied | \n", "none | \n", "no | \n", "yes | \n", "no | \n", "series well described by a fitted AR/ARIMA/VAR... | \n", "
| sieve_ar | \n", "SieveAR | \n", "yes | \n", "model-implied | \n", "none | \n", "no | \n", "no | \n", "no | \n", "series well described by a fitted AR/ARIMA/VAR... | \n", "