Abstract
This paper introduces GeoShapley, a game theory approach to measuring spatialeffects in machine learning models. GeoShapley extends the Nobel Prize-winningShapley value framework in game theory by conceptualizing location as a playerin a model prediction game, which enables the quantification of the importanceof location and the synergies between location and other features in a model.GeoShapley is a model-agnostic approach and can be applied to statistical orblack-box machine learning models in various structures. The interpretation ofGeoShapley is directly linked with spatially varying coefficient models forexplaining spatial effects and additive models for explaining non-spatialeffects. Using simulated data, GeoShapley values are validated against knowndata-generating processes and are used for cross-comparison of sevenstatistical and machine learning models. An empirical example of house pricemodeling is used to illustrate GeoShapley's utility and interpretation withreal world data. The method is available as an open-source Python package namedgeoshapley.