Skip to content

Ensemble in a neighborhood

Combine three models into a risk map and watch the PAI change with weights, POI Boost and the cutoff rule.

What this lab shows

A made-up neighborhood split into small squares, with invented records and three models that imitate the behavior of the Random Forest, the LSTM and the Transformer. You build the Hybrid Ensemble combination step by step, as in the book, and compare the risk zone with those of the models alone and of simple rules with no learning.

Neighborhood, records and models are made up. The combination and metric formulas are the ones in the book.

How to use it

  1. Tap a square and follow the calculation: weighted average, maximum term, POI Boost and filter.
  2. Change the weights and compare the Ensemble PAI with that of the LSTM, the Transformer and the 24-week average.
  3. In the quiet area, use the old rule with a 20% zone and watch ties blow past the zone.
LabEnsemble in a neighborhoodTry it

Illustrative dataNeighborhood, records and points of interest are made up. The three models are simple imitations that reproduce the typical behavior described in the study; they are not the trained models of the dissertation nor SSP-SP data. The combination and the metrics follow the formulas in the book.

Ensemble with the study settings, central area, month A, 10% zone. Squares with a thick border form the risk zone.

ModelPAICrimes in the zone
Ensemble (your settings)2.5826%
LSTM2.0621%
Transformer2.7128%
Random Forest2.3924%
24-week average (no learning)2.7128%
4-week sum (no learning)1.8118%
What to notice: When all models read the same history, the combination lands at the level of the best components and of the simple average. What changes the result a lot is how you measure: a cutoff rule with ties can mark the whole neighborhood.

Books that use this lab

No published book uses this lab yet.