GithubHelp home page GithubHelp logo

savvastj / interpretability-implementations-demos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from csinva/imodels

0.0 1.0 0.0 16.74 MB

Sklearn-compatible interpretability implementations and demos.

Home Page: https://csinva.github.io/interpretability-implementations-demos/docs/

License: MIT License

Jupyter Notebook 84.06% Python 15.94%

interpretability-implementations-demos's Introduction

Interpretable machine learning models (imodels) ๐Ÿ”

Straightforward implementations of interpretable ML models + demos of how to use various interpretability techniques. Code is optimized for readability. Pull requests welcome!

Implementations of imodels โ€ข Demo notebooks โ€ข Accompanying slides

Implementations of interpretable models

Scikit-learn style wrappers/implementations of different interpretable models. Docs is available here. The interpretable models within the imodels folder can be easily installed and used:

pip install git+https://github.com/csinva/interpretability-implementations-demos

from imodels import RuleListClassifier, RuleFit, GreedyRuleList, SkopeRules, SLIM, IRFClassifier
model = RuleListClassifier()  # initialize Bayesian Rule List
model.fit(X_train, y_train)   # fit model
preds = model.predict(X_test) # discrete predictions: shape is (n_test, 1)
preds_proba = model.predict_proba(X_test) # predicted probabilities: shape is (n_test, n_classes)

Demo notebooks

The demos are contained in 3 main notebooks, following this cheat-sheet:cheat_sheet

  1. model_based.ipynb - how to use different interpretable models
  2. posthoc.ipynb - different simple analyses to interpret a trained model
  3. uncertainty.ipynb - code to get uncertainty estimates for a model

References / further reading

interpretability-implementations-demos's People

Contributors

csinva avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.