MarkovReebs contains experiments for generating synthetic mobility trajectories from trajectory datasets using our Reeb graph-based generation methods and baseline methods.
The main workflow is:
- Load Urban Anomalies or Geolife trajectories.
- Build a multi-agent Reeb graph (MARG) from training trajectories.
- Generate per-agent trajectories with SRG, HRG, or Markov-chain baselines.
- Evaluate generated trajectories against held-out trajectories.
Install dependencies with uv:
uv syncDownload both of the necessary datasets. Set dataset locations in the environment or in .envrc:
export URBAN_ANOMALIES_PATH=/path/to/UrbanAnomalies
export GEOLIFE_PATH="/path/to/Geolife 1.3"DATAPATH is also accepted as a fallback for Urban Anomalies. If these variables are not set, the loaders fall back to the historical defaults under /data/Datasets/.
Build a MARG pickle:
uv run python marg.pyGenerate single-agent Reeb graph outputs:
uv run python srg.pyGenerate hybrid Reeb graph outputs:
uv run python hrg.pyRun the evaluation script after generating the required files in outputs/:
uv run python eval.pyeval.py loads method outputs, optionally trims Geolife trajectories, computes agent and population metrics, and prints the result dictionary.
It also writes the captured results to:
outputs/table.log
Then it immediately runs the table formatter and writes:
outputs/generated_results.typ
dataloader/ contains dataset adapters for Urban Anomalies and Geolife.
marg.py, srg.py, and hrg.py build multi-agent, single-agent, and hybrid Reeb graph outputs.
baseline.py and baseline/ implement the Markov-chain baseline.
evaluation/ and eval.py compute metrics and table-ready summaries.
visualize.py and visualizations/ contain exploratory plotting utilities.