The purpose of ShapML
is to compute stochastic feature-level Shapley values which
can be used to (a) interpret and/or (b) assess the fairness of any machine learning model.
Shapley values
are an intuitive and theoretically sound model-agnostic diagnostic tool to understand both global feature importance across all instances in a data set and instance/row-level local feature importance in black-box machine learning models.
This package implements the algorithm described in Štrumbelj and Kononenko's (2014) sampling-based Shapley approximation algorithm to compute the stochastic Shapley values for a given instance and model feature.
-
Flexibility:
- Shapley values can be estimated for any machine learning model using a simple user-defined
predict()
wrapper function.
- Shapley values can be estimated for any machine learning model using a simple user-defined
-
Speed:
- The speed advantage of
ShapML
comes in the form of giving the user the ability to select 1 or more target features of interest and avoid having to compute Shapley values for all model features (i.e., a subset of target features from a trained model will return the same feature-level Shapley values as the full model with all features). This is especially useful in high-dimensional models as the computation of a Shapley value is exponential in the number of features.
- The speed advantage of
using Pkg
Pkg.add("ShapML")
- Development
using Pkg
Pkg.add(PackageSpec(url = "https://github.com/nredell/ShapML.jl"))