Diagnostics (tsbootstrap.diagnostics)

diagnose(X): inspect a series and recommend bootstrap methods.

A lightweight, honest advisor, it measures serial dependence and stationarity and maps them to suitable method specs. It does not choose for you; it explains what it sees and what fits.

class tsbootstrap.diagnostics.Diagnosis(n_obs: int, n_series: int, lag1_autocorr: float, dependent: bool, nonstationary: bool, recommended_methods: tuple[str, ...], notes: tuple[str, ...])[source]

Bases: object

What diagnose found and what it recommends.

tsbootstrap.diagnostics.diagnose(X: object) Diagnosis[source]

Inspect X and recommend bootstrap methods for it.

Method metadata (tsbootstrap.metadata)

metadata_for() returns the MethodMetadata record for a method spec: a declarative set of facts (assumptions, multivariate and exog support, whether it preserves temporal dependence, references, and known failure modes) keyed off the concrete spec type. This is the machine-readable introspection surface that diagnose() and external tooling read to reason about a method without running it.

Machine-readable metadata for every method, keyed by spec type.

This is the introspection surface that diagnose() and tooling read to reason about which method fits a series and what each guarantees. It is data, not a string factory: dispatch keys off the concrete spec type, not a name.

class tsbootstrap.metadata.MethodMetadata(name: str, assumptions: tuple[str, ...], supports_multivariate: bool, supports_exog: bool, supports_indices: bool, supports_oob: bool, preserves_temporal_dependence: bool, references: tuple[str, ...], complexity: str, failure_modes: tuple[str, ...])[source]

Bases: object

Declarative facts about a bootstrap method.

tsbootstrap.metadata.metadata_for(spec: object) MethodMetadata[source]

Return the MethodMetadata for a method spec instance.