How sftekin/high-res-crime-forecasting works
This repository implements high-resolution crime forecasting experiments over Chicago data, with grid-based, graph-based, and statistical-model workflows. A user starts an experiment runner, which loads configuration, prepares temporal/spatial data, batches train/validation/test windows, and trains or fits models before saving predictions and scores. The graph preserves the documented model and visualization branches. Relationships are limited to calls or references shown in excerpts, the source index, or README; unsampled implementation details are not assumed.
Main entry points: grid_main.py Grid experiments · graph_main.py Graph experiments · grid_creator.py Grid construction · configs Experiment settings
Components 26
Data preparation
- Crime records
dataset - Data ingestion
data_generators/data_creator.py - Grid construction
data_generators/grid_creator.py - Graph construction
data_generators/graph_creator.py
Forecasting workflows
- Grid experiments
run_grid/grid_main.py - Grid GPR experiment
run_grid/gpr_experiment.py - Graph experiments
run_graph/graph_main.py - High-resolution graph
run_graph/graph_high_res.py - Sample prediction
run_graph/graph_sample_pred.py - Statistical experiments
run_stats/stats_main.py
Forecast models
- Graph ConvGRU
models/graph_conv_gru.py - ConvLSTM
models/convlstm.py - Single-block ConvLSTM
models/convlstm_one_block.py - Fully connected LSTM
models/fc_lstm.py - LSTM
models/lstm.py - Statistical models
models
Training and analysis
- Experiment settings
configs - Window batching
batch_generators/batch_generator.py - Batch datasets
batch_generators - Batch normalization
normalizers/batch_normalizer.py - Model training
trainer.py - Graph metrics and mapping
helpers/graph_helper.py - Metrics and splits
helpers/static_helper.py - Forecast visualization
helpers/plot_helper.py - Experiment outputs
results
Other components
- Researcher
Connections 39
- Researcher → Grid experiments: starts
run_grid/grid_main.py - Researcher → Graph experiments: starts
run_graph/graph_main.py - Researcher → Statistical experiments: starts
run_stats/stats_main.py - Crime records → Data ingestion: reads
data_generators/data_creator.py - Data ingestion → Grid construction: provides records
data_generators/grid_creator.py - Data ingestion → Graph construction: provides records
data_generators/graph_creator.py - Experiment settings → Grid experiments: configures
run_grid/grid_main.py - Experiment settings → Grid GPR experiment: configures
run_grid/gpr_experiment.py - Experiment settings → Graph experiments: configures
run_graph/graph_main.py - Experiment settings → High-resolution graph: configures
run_graph/graph_high_res.py - Experiment settings → Sample prediction: configures
run_graph/graph_sample_pred.py - Experiment settings → Statistical experiments: configures
run_stats/stats_main.py - Grid construction → Grid experiments: supplies grids
run_grid/grid_main.py - Grid construction → Grid GPR experiment: supplies grids
run_grid/gpr_experiment.py - Grid construction → Graph experiments: supplies grid data
run_graph/graph_main.py - Graph construction → Graph experiments: supplies graph data
run_graph/graph_main.py - Grid construction → High-resolution graph: supplies grids
run_graph/graph_high_res.py - Graph construction → Sample prediction: supplies graph data
run_graph/graph_sample_pred.py - Grid construction → Statistical experiments: supplies grids
run_stats/stats_main.py - Grid experiments → Window batching: builds batches
run_grid/grid_main.py - Grid GPR experiment → Window batching: builds batches
run_grid/gpr_experiment.py - Graph experiments → Window batching: builds batches
run_graph/graph_main.py - Statistical experiments → Statistical models: fits models
run_stats/stats_main.py - Window batching → Batch datasets: creates datasets
batch_generators/batch_generator.py - Window batching → Batch normalization: normalizes inputs
batch_generators/batch_generator.py - Grid experiments → ConvLSTM: selects model
run_grid/grid_main.py - Grid experiments → Single-block ConvLSTM: selects model
run_grid/grid_main.py - Grid experiments → Fully connected LSTM: selects model
run_grid/grid_main.py - Graph experiments → Graph ConvGRU: selects model
run_graph/graph_main.py - Graph experiments → LSTM: selects model
run_graph/graph_main.py - Grid experiments → Model training: trains and predicts
run_grid/grid_main.py - Graph experiments → Model training: trains and predicts
run_graph/graph_main.py - Model training → Graph metrics and mapping: computes graph metrics
trainer.py - Graph construction → Graph metrics and mapping: uses graph utilities
data_generators/graph_creator.py - Graph construction → Forecast visualization: plots data
data_generators/graph_creator.py - Grid construction → Forecast visualization: plots grids
data_generators/grid_creator.py - Graph metrics and mapping → Metrics and splits: uses metrics
helpers/graph_helper.py - Statistical experiments → Experiment outputs: writes scores
run_stats/stats_main.py - Model training → Experiment outputs: saves checkpoints