This repository contains code for the paper "Instance-based Explanations for Gradient Boosting Machine Predictions with AXIL Weights" Geertsema & Lu (2023): https://arxiv.org/abs/2301.01864
In a nutshell, AXIL weights allows any LightGBM regression prediction to be expressed as a sum of the products of the AXIL weights and the training data target instances. So
axil.py contains functionality for fitting to a LightGBM model and training data (Explainer.fit()), and constructing AXIL weights for a data set (Explainer.transform())
axil_benchmarks.py contains code that benchmarks AXIL against k-NN and five other algorithms on 12 datasets (see paper for details)
axil_performance.py contains code that measures the execution time of AXIL on synthetic datasets with a varying number of instances and GBM trees (see paper for details)
axil_test.py contains code that validates the AXIL predicted value against the GBM predicted value
wdi.py illustrates the application of AXIL weights in the context of predicting smoking prevalence by country (see the paper for details)
NOTE: This is experimental code for research purposes. Functionality may change without warning.
Feel free to send any comments / suggestions to paul.geertsema at vlerick.com
Image below: AXIL weights for countries in relation to predicting smoking prevalence (see paper)
