Skip to content

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. 1
    Install and load real data

    pip install seahorse-stpp, then load_dataset("nyc_collisions") pulls the splits straight from the Hugging Face hub at their pinned release revision — no manual download.

  2. 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. 3
    Train a baseline and a neural model

    Fit PoissonGMM as a fast parametric baseline and DeepSTPP as the neural model — the same fit() call for both.

  4. 4
    Evaluate head-to-head

    Score both on held-out test sequences and compare test_nll under one shared metric definition — comparable by construction.

  5. 5
    Visualize on the map

    Sample next events with predict_next and 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