baselines

Reference baselines for DoTime benchmark suites.

A small registry maps baseline names to constructors, so the CLI and the evaluation harness can request a baseline by string (mirroring the BASELINE_STRING_TO_CLASS table in the original tscm_identifiability.py).

Public surface

  • Baseline — the predict interface every baseline implements.

  • available() — list registered baseline names.

  • get() — instantiate a baseline by name.

  • register() — decorator to add a baseline to the registry.

Implemented: the trivial baselines (Zero, Mean/TrajMean, AR1, VAR-OLS), the classical structural baselines (BackDoorOLS, IV2SLS), Oracle (stored ground truth), and DoOverTimePFN (checkpoint-backed, the [models] extra). PCMCI+ / BayesianITS / Chronos require the [baselines] extra and raise an actionable error until that dependency and their wiring are present.

class dotime.baselines.Baseline(*args, **kwargs)[source]

Bases: Protocol

Predict interventional outcomes for an episode’s queries.

Implementations return a 1-D tensor aligned with episode.query_target / episode.query_time — one predicted value per query.

name: str
predict(episode)[source]
Return type:

Tensor

Parameters:

episode (Episode)

dotime.baselines.available()[source]

Return the names of all registered baselines.

Return type:

list[str]

dotime.baselines.get(name, **kwargs)[source]

Instantiate a registered baseline by name.

Extra keyword arguments are forwarded to the baseline constructor.

Return type:

Baseline

Parameters:
dotime.baselines.register(name)[source]

Class/factory decorator: register a baseline constructor under name.

Return type:

Callable[[Callable[..., Baseline]], Callable[..., Baseline]]

Parameters:

name (str)