Skip to content

Latest commit

 

History

History

README.md

Examples

Runnable walkthroughs of tsauditor. Each is self-contained; from the repository root, install the library plus the example extras (scikit-learn for the model comparison, jupyter/matplotlib for the notebooks):

pip install -e ".[dev,examples]"
Example Format Shows
ogdc_leakage_case/ script + notebook The flagship LEK001 case — a same-day feature (ChangeP) that reproduces the Direction target — on real OGDC equity data, plus the measured accuracy collapse once the leak is removed.
beyond_price_direction/ notebook Proof tsauditor is column-agnostic: VAL001/VAL002 validity on real volume, RSI, and OHLC columns — not just price/direction.
timesfm_adapter/ notebook The TimesFM adapter: audit + repair + format a raw series into a finite float32 array, with the finiteness guard and context truncation.
sensor-example/ notebook + script Structural and anomaly checks (ANO001, PRF002) on a synthetic sensor stream, and a to_pdf report demo.
new_features_walkthrough.ipynb notebook LEK004 as-of leakage, validity checks (VAL001/VAL002), tsa.fix(), and the TimesFM adapter, end-to-end.
validation_comparison/ notebook Time-series-aware validation vs. a general profiler (pandas baseline) — dependency-free.

Regenerating notebooks

Several notebooks are generated by builder scripts so they stay reproducible and can be re-executed to verify they are clean:

python examples/build_new_features_notebook.py   # -> new_features_walkthrough.ipynb
python examples/ogdc_leakage_case/build_ogdc_notebook.py   # -> ogdc_leakage_case/ogdc_leakage.ipynb
python examples/beyond_price_direction/build_beyond_notebook.py   # -> beyond_price_direction/beyond_price_direction.ipynb
python examples/timesfm_adapter/build_timesfm_notebook.py   # -> timesfm_adapter/timesfm_adapter.ipynb
python examples/validation_comparison/build_validation_notebook.py   # -> validation_comparison/...ipynb

Each writes the .ipynb and executes every cell; a failure means the example is out of sync with the library.