Skip to content

feat(modeling): add validated LR, SVGP and ST-SVGP pre-test pipeline - #3

Open
Omer-alt wants to merge 8 commits into
mainfrom
feature/modeling-pipeline
Open

feat(modeling): add validated LR, SVGP and ST-SVGP pre-test pipeline#3
Omer-alt wants to merge 8 commits into
mainfrom
feature/modeling-pipeline

Conversation

@Omer-alt

Copy link
Copy Markdown
Collaborator

Summary

This PR consolidates the probabilistic modeling phase for urban expansion forecasting in Yaoundé.

It adds and documents the retained Logistic Regression, SVGP and ST-SVGP workflows, together with the controlled feature-engineering experiments, mathematical validation gates, chronological rolling evaluation, calibration diagnostics and retained experimental alternatives.

The main objective of this branch is to provide a reproducible pre-test modeling pipeline .


What is included

Logistic Regression

  • Retained chronological Logistic Regression baseline.
  • Uses the same pre-test rolling validation protocol as the Gaussian Process models:
    • train 2000 → validate 2005
    • train 2000, 2005 → validate 2010
    • train 2000, 2005, 2010 → validate 2015
  • The feature specification was updated after feature-engineering experiments.
  • The interaction built_fraction_x_recent_growth_t was retained because it also improved the Logistic Regression comparator.

SVGP

The retained SVGP remains the Adam-based Bernoulli-probit sparse variational GP with:

  • separable Matérn-3/2 spatial × temporal kernel;
  • 64 fixed spatial inducing locations;
  • spatial coordinates and time represented in the GP covariance rather than the parametric mean;
  • chronological rolling validation.

Feature-engineering experiments

Three controlled feature sets were evaluated:

  1. base
  2. log_distance
  3. log_distance_growth

The retained Strong SVGP is:

log_distance_growth

with the additional retained features:

log_distance_to_built_m_t
built_fraction_x_recent_growth_t

The current conclusion is therefore nuanced:

  • Logistic Regression still leads on aggregate proper scoring rules.
  • SVGP improves after feature engineering.
  • ST-SVGP does not yet dominate overall.

Main files added / updated

Configuration

configs/modeling/st_svgp.yaml
configs/modeling/st_svgp/
configs/modeling/svgp_experiment.yaml
configs/modeling/logistic_regression_experiment.yaml

ST-SVGP implementation

src/models/train_st_svgp.py
src/models/st_svgp/state_space.py
src/models/st_svgp/filtering.py
src/models/st_svgp/cvi.py
src/models/st_svgp/spatial.py
src/models/st_svgp/block_inference.py
src/models/st_svgp/model.py

Mathematical validation

src/models/st_svgp/validate_temporal_kernel.py
src/models/st_svgp/validate_filter_smoother.py
src/models/st_svgp/validate_cvi_natgrad.py

Evaluation

src/models/evaluation/evaluate_probabilities.py
src/models/evaluation/calibration.py
src/models/evaluation/prediction_sets.py

Tests

tests/test_st_svgp.py
tests/test_st_svgp_filtering.py
tests/test_st_svgp_cvi.py
tests/test_st_svgp_model.py

Documentation

docs/modeling_st_svgp.md
docs/documented_file_structure.md
README.md
Makefile

Validation commands

The main checks can be reproduced with:

make st-svgp-tests
make st-svgp-pretraining-validation
make st-svgp-preflight
make st-svgp-rolling
make st-svgp-compare-oof

The promoted ST-SVGP candidate currently passes the retained validation gates and rolling workflow.


Out of scope

This PR intentionally does not include:

  • final 2020 → 2025 evaluation;
  • 2030 / 2035 production forecasts;
  • row-level OOF Parquet prediction files;
  • local archive directories;

@Omer-alt
Omer-alt requested a review from rapsoj August 19, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant