Skip to contents

Function for locally explained heterogeneity model.

Usage

lesh(formula, data, cores = 1, ...)

Arguments

formula

A formula of LESH model.

data

A data.frame, tibble or sf object of observation data.

cores

(optional) A positive integer(default is 1). If cores > 1, a 'parallel' package cluster with that many cores is created and used. You can also supply a cluster object.

...

(optional) Other arguments passed to rpart_disc().

Value

A list of LESH model result.

interaction

the interaction result of LESH model

spd_lesh

a tibble of the SHAP power of determinants

Note

The LESH model requires at least \(2^n-1\) calculations when has \(n\) explanatory variables. When there are more than 10 explanatory variables, carefully consider the computational burden of this model. When there are a large number of explanatory variables, the data dimensionality reduction method can be used to ensure the trade-off between analysis results and calculation speed.

References

Li, Y., Luo, P., Song, Y., Zhang, L., Qu, Y., & Hou, Z. (2023). A locally explained heterogeneity model for examining wetland disparity. International Journal of Digital Earth, 16(2), 4533–4552. https://doi.org/10.1080/17538947.2023.2271883

Author

Wenbo Lv lyu.geosocial@gmail.com

Examples

data('ndvi')
g = lesh(NDVIchange ~ ., data = ndvi)
g
#> ***    Spatial Interaction Association Detector      
#>                      LESH Model                     
#> 
#> |    Interactive variable     |    Interaction     |
#> |:---------------------------:|:------------------:|
#> |    Climatezone ∩ Mining     |    Weaken, uni-    |
#> |  Climatezone ∩ Tempchange   |    Weaken, uni-    |
#> | Climatezone ∩ Precipitation |    Enhance, bi-    |
#> |      Climatezone ∩ GDP      |    Enhance, bi-    |
#> |  Climatezone ∩ Popdensity   |    Enhance, bi-    |
#> |     Mining ∩ Tempchange     |    Enhance, bi-    |
#> |   Mining ∩ Precipitation    |    Weaken, uni-    |
#> |        Mining ∩ GDP         |    Enhance, bi-    |
#> |     Mining ∩ Popdensity     |    Enhance, bi-    |
#> | Tempchange ∩ Precipitation  |    Enhance, bi-    |
#> |      Tempchange ∩ GDP       | Enhance, nonlinear |
#> |   Tempchange ∩ Popdensity   |    Enhance, bi-    |
#> |     Precipitation ∩ GDP     |    Enhance, bi-    |
#> | Precipitation ∩ Popdensity  |    Enhance, bi-    |
#> |      GDP ∩ Popdensity       |    Weaken, uni-    |