Problem
A bank wants its customer models to know the environment where a customer lives and spends money. Raw latitude and longitude describe a single point and say nothing about its surroundings, so models cannot use them directly. Transaction counts are also ambiguous without location context. The features also need one shared home, so every model can use them, not only the geo models.
Example from the article: a customer has 10 "Fast food" transactions. Location shows that 9 were morning pastries and coffee at a cafe and only 1 was at a fast-food outlet, so the customer does not live on fast food.
Solution in brief
Map every object and transaction to a cell of the H3 hexagonal grid, compute one feature per cell and keep each as a separate layer (for example, grocery stores per hexagon). A monthly Feature Store job refreshes the layers and links customers to hexagons. Moran's index on the target shows beforehand whether geo layers are worth adding.
Questions this case answers
- How to turn point coordinates into model-ready features that describe the surroundings of an entity
- How to decide before training whether spatial features can help predict a given target
- How to turn raw coordinates and transaction locations into features a customer-level ML model can use?
- How to store geo features once and reuse them across many models?
Tools and methods
- H3 — hexagonal geospatial index: converts coordinates to hexagon IDs and aggregates data across resolutions
- OpenStreetMap — source of points of interest and road data (distances to stops, metro, main roads)
- Feature Store — monthly recalculation of geo layers and storage of the customer-to-hexagon link
- Moran's index — checks spatial autocorrelation of the target before modeling
Google or a one-time email code. No password.