End-to-End Case Study¶
A short end-to-end example on real data. The notebook installs Seahorse from PyPI, loads the NYC motor-vehicle collisions dataset, explores it on a map, trains a baseline and a neural model, scores both under one metric, and visualizes the predictions — on CPU, in a few minutes.
Open the case study in ColabNYC collisions · CPU-only · no local setup
What the notebook walks through¶
-
1
Install and load real data
pip install seahorse-stpp, thenload_dataset("nyc_collisions")pulls the splits straight from the Hugging Face hub at their pinned release revision — no manual download. -
2
Explore it like a practitioner
Inspect events per sequence, the daily rhythm of collisions, and a map of collision density across New York City — the spatial pattern a model has to capture.
-
3
Train a baseline and a neural model
Fit
PoissonGMMas a fast parametric baseline andDeepSTPPas the neural model — the samefit()call for both. -
4
Evaluate head-to-head
Score both on held-out test sequences and compare
test_nllunder one shared metric definition — comparable by construction. -
5
Visualize on the map
Sample next events with
predict_nextand plot the model's predicted collision locations against the true next event, over the NYC map.
Why this dataset¶
- Real data — NYC collisions is one of the lightest real datasets in the catalog (under 10 MB), so it runs on a free CPU runtime.
- Comparable by construction — the baseline and the neural model share the same splits, normalization, and metric definition.
- No local setup — the notebook installs the published package; nothing to clone or configure.
Then go deeper¶
- Dataset Catalog — swap NYC collisions for any released dataset.
- Run a Benchmark — compare many presets and seeds.
- Python API — the full programmatic surface behind the notebook.