All Projects → explainX → Explainx

explainX / Explainx

Licence: mit
Explainable AI framework for data scientists. Explain & debug any blackbox machine learning model with a single line of code.

Projects that are alternatives of or similar to Explainx

Interpretable machine learning with python
Examples of techniques for training interpretable ML models, explaining ML models, and debugging ML models for accuracy, discrimination, and security.
Stars: ✭ 530 (+170.41%)
Mutual labels:  transparency, jupyter-notebook, interpretability
Mli Resources
H2O.ai Machine Learning Interpretability Resources
Stars: ✭ 428 (+118.37%)
Mutual labels:  transparency, jupyter-notebook, interpretability
Interpret
Fit interpretable models. Explain blackbox machine learning.
Stars: ✭ 4,352 (+2120.41%)
Mutual labels:  transparency, scikit-learn, interpretability
Imodels
Interpretable ML package 🔍 for concise, transparent, and accurate predictive modeling (sklearn-compatible).
Stars: ✭ 194 (-1.02%)
Mutual labels:  jupyter-notebook, scikit-learn, interpretability
Cheatsheets.pdf
📚 Various cheatsheets in PDF
Stars: ✭ 159 (-18.88%)
Mutual labels:  jupyter-notebook, scikit-learn
Python Clustering Exercises
Jupyter Notebook exercises for k-means clustering with Python 3 and scikit-learn
Stars: ✭ 153 (-21.94%)
Mutual labels:  jupyter-notebook, scikit-learn
Machine Learning And Reinforcement Learning In Finance
Machine Learning and Reinforcement Learning in Finance New York University Tandon School of Engineering
Stars: ✭ 173 (-11.73%)
Mutual labels:  jupyter-notebook, scikit-learn
Bert Sklearn
a sklearn wrapper for Google's BERT model
Stars: ✭ 182 (-7.14%)
Mutual labels:  jupyter-notebook, scikit-learn
Python Machine Learning Book
The "Python Machine Learning (1st edition)" book code repository and info resource
Stars: ✭ 11,428 (+5730.61%)
Mutual labels:  jupyter-notebook, scikit-learn
Python Machine Learning Book 3rd Edition
The "Python Machine Learning (3rd edition)" book code repository
Stars: ✭ 2,883 (+1370.92%)
Mutual labels:  jupyter-notebook, scikit-learn
Practical Machine Learning With Python
Machine Learning Tutorials in Python
Stars: ✭ 183 (-6.63%)
Mutual labels:  jupyter-notebook, scikit-learn
Machine Learning With Python
Practice and tutorial-style notebooks covering wide variety of machine learning techniques
Stars: ✭ 2,197 (+1020.92%)
Mutual labels:  jupyter-notebook, scikit-learn
Hands On Machine Learning With Scikit Learn Keras And Tensorflow
Notes & exercise solutions of Part I from the book: "Hands-On ML with Scikit-Learn, Keras & TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems" by Aurelien Geron
Stars: ✭ 151 (-22.96%)
Mutual labels:  jupyter-notebook, scikit-learn
Shap
A game theoretic approach to explain the output of any machine learning model.
Stars: ✭ 14,917 (+7510.71%)
Mutual labels:  jupyter-notebook, interpretability
Ml Workspace
🛠 All-in-one web-based IDE specialized for machine learning and data science.
Stars: ✭ 2,337 (+1092.35%)
Mutual labels:  jupyter-notebook, scikit-learn
Awesome Machine Learning Interpretability
A curated list of awesome machine learning interpretability resources.
Stars: ✭ 2,404 (+1126.53%)
Mutual labels:  transparency, interpretability
Whotracks.me
Data from the largest and longest measurement of online tracking.
Stars: ✭ 189 (-3.57%)
Mutual labels:  transparency, jupyter-notebook
Catalogos Dados Brasil
Mapeamento de iniciativas (e catálogos) de dados abertos governamentais no Brasil.
Stars: ✭ 187 (-4.59%)
Mutual labels:  transparency, jupyter-notebook
Pqkmeans
Fast and memory-efficient clustering
Stars: ✭ 189 (-3.57%)
Mutual labels:  jupyter-notebook, scikit-learn
Py4chemoinformatics
Python for chemoinformatics
Stars: ✭ 140 (-28.57%)
Mutual labels:  jupyter-notebook, scikit-learn

explainX: Explainable AI Framework for Data Scientists

ExplainX is a model explainability/interpretability framework for data scientists and business users.

Supported Python versions Downloads Maintenance Website

Use explainX to understand overall model behavior, explain the "why" behind model predictions, remove biases and create convincing explanations for your business stakeholders. Tweet

explainX.ai

Why we need model explainability & interpretibility?

Essential for:

  1. Explaining model predictions
  2. Debugging models
  3. Detecting biases in data
  4. Gaining trust of business users
  5. Successfully deploying AI solution

What questions can we answer with explainX?

  1. Why did my model make a mistake?
  2. Is my model biased? If yes, where?
  3. How can I understand and trust the model's decisions?
  4. Does my model satisfy legal & regulatory requirements?

We have deployed the app on our server so you can play around with the dashboard. Check it out:

Dashboard Demo: http://3.128.188.55:8080/

Getting Started

Installation

Python 3.5+ | Linux, Mac, Windows

pip install explainx

To download on Windows, please install Microsoft C++ Build Tools first and then install the explainX package via pip

Installation on the cloud

If you are using a notebook instance on the cloud (AWS SageMaker, Colab, Azure), please follow our step-by-step guide to install & run explainX cloud. Cloud Installation Instructions

Usage (Example)

After successfully installing explainX, open up your Python IDE of Jupyter Notebook and simply follow the code below to use it:

  1. Import required module.
from explainx import * 
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split

  1. Load and split your dataset into x_data and y_data
#Load Dataset: X_Data, Y_Data 
#X_Data = Pandas DataFrame
#Y_Data = Numpy Array or List

X_data,Y_data = explainx.dataset_heloc()

  1. Split dataset into training & testing.
X_train, X_test, Y_train, Y_test = train_test_split(X_data,Y_data, test_size=0.3, random_state=0)

  1. Train your model.
# Train a RandomForest Model
model = RandomForestClassifier()
model.fit(X_train, Y_train)

After you're done training the model, you can either access the complete explainability dashboard or access individual techniques.

Complete Explainability Dashboard

To access the entire dashboard with all the explainability techniques under one roof, follow the code down below. It is great for sharing your work with your peers and managers in an interactive and easy to understand way.

5.1. Pass your model and dataset into the explainX function:

explainx.ai(X_test, Y_test, model, model_name="randomforest")

5.2. Click on the dashboard link to start exploring model behavior:

App running on https://127.0.0.1:8080

Explainability Modules

In this latest release, we have also given the option to use explainability techniques individually. This will allow the user to choose technique that fits their personal AI use case.

6.1. Pass your model, X_Data and Y_Data into the explainx_modules function.

explainx_modules.ai(model, X_test, Y_test)

As an upgrade, we have eliminated the need to pass in the model name as explainX is smart enough to identify the model type and problem type i.e. classification or regression, by itself.

You can access multiple modules:

Module 1: Dataframe with Predictions

explainx_modules.dataframe_graphing()

Module 2: Model Metrics

explainx_modules.metrics()

Module 3: Global Level SHAP Values

explainx_modules.shap_df()

Module 4: What-If Scenario Analysis (Local Level Explanations)

explainx_modules.what_if_analysis()

Module 5: Partial Dependence Plot & Summary Plot

explainx_modules.feature_interactions()

Module 6: Model Performance Comparison (Cohort Analysis)

explainx_modules.cohort_analysis()

To access the modules within your jupyter notebook as IFrames, just pass the mode='inline' argument.

For detailed description into each module, check out our documentation at https://www.docs.explainx.ai

Cloud Installation

If you are running explainX on the cloud e.g., AWS Sagemaker? https://0.0.0.0:8080 will not work. Please visit our documentation for installation instructions for the cloud: Cloud Installation Instructions

After installation is complete, just open your terminal and run the following command.


lt -h "https://serverless.social" -p [port number]


lt -h "https://serverless.social" -p 8080

explainX.ai

Walkthough Video Tutorial

Please click on the image below to load the tutorial:

here

(Note: Please manually set it to 720p or greater to have the text appear clearly)

Supported Techniques

Interpretability Technique Status
SHAP Kernel Explainer Live
SHAP Tree Explainer Live
What-if Analysis Live
Model Performance Comparison Live
Partial Dependence Plot Live
Surrogate Decision Tree Coming Soon
Anchors Coming Soon
Integrated Gradients (IG) Coming Soon

Main Models Supported

No. Model Name Status
1. Catboost Live
2. XGboost==1.0.2 Live
3. Gradient Boosting Regressor Live
4. RandomForest Model Live
5. SVM Live
6. KNeighboursClassifier Live
7. Logistic Regression Live
8. DecisionTreeClassifier Live
9. All Scikit-learn Models Live
10. Neural Networks Live
11. H2O.ai AutoML Live
12. TensorFlow Models Coming Soon
13. PyTorch Models Coming Soon

Contributing

Pull requests are welcome. In order to make changes to explainx, the ideal approach is to fork the repository then clone the fork locally.

For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

Report Issues

Please help us by reporting any issues you may have while using explainX.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].