Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
/ skMAPLE Public archive

An implementation (sklearn API) of Model Agnostic Supervised Local Explanation (MAPLE) by Plumb et al. and reproduction of "accuracy" experiments.

Notifications You must be signed in to change notification settings

IBCNServices/skMAPLE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAPLE: Model Agnostic suPervised Local Explanations

by Gregory Plumb, Denali Molitor and Ameet S. Talwalkar ([paper] [blog])

How to use

1. Create an ensemble classifier (that has an apply method which returns the leaf indices of the different predictions) and a linear model

from sklearn.linear_model import Ridge
from sklearn.ensemble import RandomForestRegressor
rf = RandomForestRegressor(n_estimators=200, max_features=0.5, min_samples_leaf=10)
lr = Ridge(alpha=0.001)

2. Create the MAPLE object and pass along the ensemble and linear model

from skmaple import MAPLE
maple = MAPLE(rf, lr)

3. Fit and predict

maple.fit(X_train, y_train)
preds = maple.predict(X_test)

Check out skmaple/example.py for an example!

Reproducing accuracy experiments

In order to compare MAPLE to the linear model and ensemble method (which it uses), you can run experiments/run.py. Currently, it will only do 1 run per dataset, but this can easily be adapted (change the range value in the script).

About

An implementation (sklearn API) of Model Agnostic Supervised Local Explanation (MAPLE) by Plumb et al. and reproduction of "accuracy" experiments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages