Metadata-Version: 2.1
Name: interpret-extension
Version: 0.1.4
Summary: This extension aims to expand InterpretML by                  integrating probabilistic models while leveraging the existing                  explanation mechanisms provided by the library. By doing so, we                  enable users to analyze uncertainty, quantify probabilistic                  predictions, and gain deeper insights into model behavior beyond point estimates.
Home-page: https://github.com/bmihaljevic/tfg-interpretml
Author: Javier Pérez Vargas
Author-email: javipv2003pv@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: joblib==1.4.2
Requires-Dist: numpy==1.26.4
Requires-Dist: pandas==2.2.3
Requires-Dist: pyAgrum==1.15.1
Requires-Dist: scikit_learn==1.3.2
Requires-Dist: scipy==1.13.1
Requires-Dist: torch==2.6.0
Requires-Dist: tqdm==4.66.2
Requires-Dist: loguru==0.7.3
Requires-Dist: tensorboard==2.19.0
Requires-Dist: matplotlib-inline==0.1.7
Requires-Dist: ipython==8.18.1
Requires-Dist: requests==2.32.3
Requires-Dist: Flask==2.2.2
Requires-Dist: Werkzeug==2.2.2
Requires-Dist: gevent==24.11.1
Requires-Dist: dash==2.18.2
Requires-Dist: dash-cytoscape==1.0.2
Requires-Dist: gevent==24.11.1
Provides-Extra: debug
Requires-Dist: psutil==6.1.1; extra == "debug"
Provides-Extra: notebook
Requires-Dist: ipykernel==6.29.5; extra == "notebook"
Requires-Dist: ipython==8.18.1; extra == "notebook"
Provides-Extra: plotly
Requires-Dist: plotly==5.24.1; extra == "plotly"
Provides-Extra: lime
Requires-Dist: lime==0.2.0.1; extra == "lime"
Provides-Extra: sensitivity
Requires-Dist: SALib==1.5.1; extra == "sensitivity"
Provides-Extra: shap
Requires-Dist: shap==0.46.0; extra == "shap"
Requires-Dist: dill>=0.2.5; extra == "shap"
Provides-Extra: linear
Provides-Extra: skoperules
Requires-Dist: skope-rules>=1.0.1; extra == "skoperules"
Provides-Extra: treeinterpreter
Requires-Dist: treeinterpreter==0.2.3; extra == "treeinterpreter"
Provides-Extra: aplr
Requires-Dist: aplr==10.8.0; extra == "aplr"
Provides-Extra: testing
Requires-Dist: scikit-learn>=1.0.0; extra == "testing"
Requires-Dist: pytest>=4.3.0; extra == "testing"
Requires-Dist: pytest-runner>=4.4; extra == "testing"
Requires-Dist: pytest-xdist>=1.29; extra == "testing"
Requires-Dist: nbconvert>=5.4.1; extra == "testing"
Requires-Dist: selenium>=3.141.0; extra == "testing"
Requires-Dist: pytest-cov>=2.6.1; extra == "testing"
Requires-Dist: ruff>=0.1.2; extra == "testing"
Requires-Dist: jupyter>=1.0.0; extra == "testing"
Requires-Dist: ipywidgets==8.1.5; extra == "testing"

# Extending [InterpretML](https://github.com/interpretml/interpret)

As it Github page says:

"**InterpretML** is an open-source package that incorporates state-of-the-art machine learning **interpretability techniques** under one roof. With this package, you can train interpretable glassbox models and explain blackbox systems. InterpretML helps you understand your model's global behavior, or understand the reasons behind individual predictions."

## Installation

The easiest way to install this extension of **InterpretML** is by following these steps:

1. Create a new conda environment:
```
conda create --name {env_name} python=3.9
```

2. Activate the environment:
```
conda activate {env_name}
```

3. Navigate to the root directory and install:
```
pip install ./interpret/python/interpret-core
```

While you can choose not to use conda, it is recommended to avoid potential conflicts with dependencies.

## Objective of this Extension

Currently, InterpretML implements several interpretable models, such as Explainable Boosting Machines (EBMs), decision trees, and linear models, along with various explanation techniques for blackbox models.

This extension aims to expand InterpretML by integrating probabilistic models while leveraging the existing explanation mechanisms provided by the library. By doing so, we enable users to analyze uncertainty, quantify probabilistic predictions, and gain deeper insights into model behavior beyond point estimates.

## How InterpretML visualize glassbox models?

InterpretML uses two main ways to explain these type of models:

- **Global Explanations**: These explanations provide insights into how a model makes predictions across the **entire dataset**.

<p align="center">
  <img width="700" align="center" alt="Image" src="https://raw.githubusercontent.com/javipzv/raw-images/refs/heads/main/images/global_explanation.png" />
</p>

<br>

- **Local Explanations**: These explanations focus on **individual predictions**, showing why the model made a specific decision for a given instance.

<p align="center">
  <img width="700" align="center" alt="Image" src="https://github.com/javipzv/raw-images/blob/main/images/local_explanation.png?raw=true" />
</p>
<br>

The main goal will be to use both global and local visualizations for different models that InterpretML does not currently implement.

## Adding new models

The new models incorporated in this extension are:

- **Naive Bayes** (Gaussian and Categorical): A simple yet powerful probabilistic model based on Bayes' theorem. It assumes feature independence, making it highly efficient for classification tasks.

- **Linear Discriminant Model**: A classification model that finds the linear combination of features that best separates two or more classes. It is particularly useful for dimensionality reduction while preserving class separability.

- **TAN** (Tree Augmented Naive Bayes): An extension of Naive Bayes that allows for dependencies between features using a tree structure, improving its expressiveness while maintaining efficiency.

- **Bayesian Network**: A probabilistic graphical model that represents variables and their conditional dependencies via a directed acyclic graph (DAG). It is useful for modeling complex probabilistic relationships.

- **NAM** (Neural Additive Model): A neural network-based approach that extends Generalized Additive Models (GAMs) by learning feature contributions in a flexible and interpretable manner.

These models will be integrated with InterpretML's existing explanation mechanisms, ensuring users can interpret their predictions using global and local explanations.
