XAISuite


NameXAISuite JSON
Version 2.9.2 PyPI version JSON
download
home_pagehttps://github.com/11301858/XAISuite
SummaryXAISuite: Training and Explanation Generation Utilities for Machine Learning Models
upload_time2023-09-05 01:21:31
maintainer
docs_urlNone
authorShreyan Mitra
requires_python
license
keywords xai explainable ai explanation machine learning models
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
    <br>
    <img src="https://user-images.githubusercontent.com/66180831/209478341-a1b4d80b-dbcb-448c-a3e0-109e27590ec5.png" width="400"/>
    <br>
<p>

# Introducing XAISuite Version 2.0: Comparing Machine Learning Explainers


<div align="center">
  <a href="#">
  <img src="https://img.shields.io/badge/Python-3.7, 3.8, 3.9, 3.10-blue">
  </a>
  
  <a href="https://pypi.python.org/pypi/XAISuite">
  <img alt="PyPI" src="https://img.shields.io/pypi/v/XAISuite"/>
  </a>
  
  <a href="https://pepy.tech/project/XAISuite">
  <img alt="Downloads" src="https://static.pepy.tech/badge/xaisuite">   
  </a>
  
  <a href="https://github.com/11301858/XAISuite">
  <img alt="Documentation" src="https://github.com/11301858/XAISuite/actions/workflows/docs.yml/badge.svg"/>
  </a>
  
  
  <a href="https://arxiv.org/abs/2304.08499">
  <img alt="DOI" src="https://zenodo.org/badge/DOI/10.48550/ARXIV.2304.08499.svg"/>
  </a>

</div>

Welcome to our source page. Our mission is to make machine learning explanation easy and available to all! Whether you are a data scientist, researcher, or just a person curious about how you can gain a better understanding of artificial intelligence, XAISuite is the library for you. Please be sure to contribute and contact us if you have any questions. 

## Table of Contents
1. [Introduction](#introduction)
2. [Installation](#installation)
3. [Getting Started](#getting-started)
4. [How to Contribute](#how-to-contribute)
5. [Technical Report and Citing XAISuite](#technical-report-and-citing-xaisuite)


## Introduction

XAISuite (E<b>x</b>planatory <b>A</b>rtificial <b>I</b>ntelligence <b>Suite</b>) is a library for comparing explanatory systems. In addition, it streamlines the training and explanation generation process into one line of code so that users can focus on insights instead of the mechanics of how models are trained and explained. 

While we would like to highlight the fact that you only need one line of code for training and explaining your models with XAISuite, our main contribution is a novel algorithm that outputs a similarity value between two ordered vectors containing the outputs of machine learning explainers. 

But first, what are explainers? Machine learning models are opaque models, so we have no idea what's going on inside of them. Explainers help us understand machine learning models we have trained and therefore give us aa better idea of why machine learning models fail in particular instances.

XAISuite accomplishes machine learning model training and explanation generation in three steps: (1) data loading, (2) data processing, and (3) model training and explanation generation. Each of these steps are delved into more detail in our [documentation](https://11301858.github.io/XAISuite), in the demo tutorials, and are overviewed in the graphic below: 


![A schematic of XAISuite functionalities](https://github.com/11301858/XAISuite/assets/66180831/b45ca3b3-10d3-458a-a2c6-6d25bc5abbd8)


A key part of XAISuite is flexibility, and, in our mission to make machine learning available to all, we have made XAISuite available in the following formats:

1. As a Python Library (with XAISuite and XAISuiteGUI)
2. On the Command Line (with XAISuiteCLI)
3. In block-code (with XAISuiteBlock)


*A note on formats: XAISuiteCLI and XAISuiteGUI run on v1.0.8. This will not change in the near future.* 


As far as we know, XAISuite is among the first comprehensive libraries that allow users to both train and explain models, and the first to provide utilities for explanation comparison. XAISuite was created with a focus on users, and our interface reflects that. We also pioneered the ability to interact with machine learning models on the command line.


## Installation

You can install the ``XAI Suite`` through PyPI:

``
pip install XAISuite
``

This will automatically install the latest version and is the reccomended way to download the library. The version on Github may not be stable. If yu already have XAISuite and want to upgrade it, do:

``
pip install XAISuite --upgrade
``
Follow the instructions in individual folder READMEs for further installation instructions. For example, to install the command-line tool for XAISuite, do


``
brew install xaisuitecli
``

XAISuite 2.0.0 is not backward-compatible with XAISuite 1.0.8. If you want to install version 1.0.8, simply type:
``
pip install XAISuite==1.0.8
``

## Getting Started

For comprehensive example code and an introduction to the library, see the Demo Folder. The Demo folder is never fully complete and we will add more and more tutorials as the project progresses.

If you are looking for a model or dataset to use, [sklearn](https://scikit-learn.org/stable/) has several cool options.

Examples of graphs and tables generated by the XAISuite version 1.0.8 can be found [here](https://drive.google.com/drive/u/2/folders/10t4_GYDPJl2sM9hDOuezbum-yqKpN4fc).

Follow the instructions in individual folder READMEs for further installation instructions.

Below, we include an example of explaining a Support Vector Classifier Model as a demonstration of what XAISuite can accomplish.

```python
from xaisuite import*
from sklearn.svm import*

z = DataLoader(make_classification, n_samples = 700)
y = DataProcessor(z, processor = "TabularTransform")
x = ModelTrainer(SVC(), y, explainers = {"lime": {"feature_selection": "none"}, "shap": {}})
x.getExplanationsFor([])["lime"].ipython_plot(20)
a = InsightGenerator(x.getExplanationsFor([]))
corr = a.calculateExplainerSimilarity("lime", "shap")

#You can condense this in one line

corr = InsightGenerator(ModelTrainer(SVC(), DataProcessor(DataLoader(make_classification, n_samples = 700) , processor = "TabularTransform"), explainers = {"lime": {"feature_selection": "none"}, "shap":{}}).getExplanationsFor([])).calculateExplainerSimilarity("lime", "shap")
```

For example involving PyTorch, SciKeras, and custom models, check out the tutorials and example code in the Demo folder. 

## How to Contribute

We welcome the contribution from the open-source community to improve the library!

To add a new functionality into the library or point out a flaw, please create a new issue on Github. We'll try to look into your requests as soon as we can. Keep in mind that, as this is an open-source project, you release any copyright protection over code you may contribute to the XAISuite Project.

## Technical Report and Citing XAISuite
Use the following BibTex to cite XAISuite:

For XAISuite v1.0.8:
```
@misc{mitra2023xaisuite,
      title={The XAISuite framework and the implications of explanatory system dissonance}, 
      author={Shreyan Mitra and Leilani Gilpin},
      year={2023},
      eprint={2304.08499},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}
```
For XAISuite v2.0:
```
@misc{mitra2023xaisuite,
      title={Paper pending}, 
      author={Shreyan Mitra and Leilani Gilpin},
      year={2023},
      eprint={},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}
```


## Contact Us
If you have any questions, comments or suggestions, please do not hesitate to contact us at xaisuite@gmail.com 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/11301858/XAISuite",
    "name": "XAISuite",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "XAI Explainable AI Explanation Machine Learning Models",
    "author": "Shreyan Mitra",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/90/1c/fc7e98bb559101038bd37034ca91537a250d40a783c3bd70d4d991add543/XAISuite-2.9.2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n    <br>\n    <img src=\"https://user-images.githubusercontent.com/66180831/209478341-a1b4d80b-dbcb-448c-a3e0-109e27590ec5.png\" width=\"400\"/>\n    <br>\n<p>\n\n# Introducing XAISuite Version 2.0: Comparing Machine Learning Explainers\n\n\n<div align=\"center\">\n  <a href=\"#\">\n  <img src=\"https://img.shields.io/badge/Python-3.7, 3.8, 3.9, 3.10-blue\">\n  </a>\n  \n  <a href=\"https://pypi.python.org/pypi/XAISuite\">\n  <img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/XAISuite\"/>\n  </a>\n  \n  <a href=\"https://pepy.tech/project/XAISuite\">\n  <img alt=\"Downloads\" src=\"https://static.pepy.tech/badge/xaisuite\">   \n  </a>\n  \n  <a href=\"https://github.com/11301858/XAISuite\">\n  <img alt=\"Documentation\" src=\"https://github.com/11301858/XAISuite/actions/workflows/docs.yml/badge.svg\"/>\n  </a>\n  \n  \n  <a href=\"https://arxiv.org/abs/2304.08499\">\n  <img alt=\"DOI\" src=\"https://zenodo.org/badge/DOI/10.48550/ARXIV.2304.08499.svg\"/>\n  </a>\n\n</div>\n\nWelcome to our source page. Our mission is to make machine learning explanation easy and available to all! Whether you are a data scientist, researcher, or just a person curious about how you can gain a better understanding of artificial intelligence, XAISuite is the library for you. Please be sure to contribute and contact us if you have any questions. \n\n## Table of Contents\n1. [Introduction](#introduction)\n2. [Installation](#installation)\n3. [Getting Started](#getting-started)\n4. [How to Contribute](#how-to-contribute)\n5. [Technical Report and Citing XAISuite](#technical-report-and-citing-xaisuite)\n\n\n## Introduction\n\nXAISuite (E<b>x</b>planatory <b>A</b>rtificial <b>I</b>ntelligence <b>Suite</b>) is a library for comparing explanatory systems. In addition, it streamlines the training and explanation generation process into one line of code so that users can focus on insights instead of the mechanics of how models are trained and explained. \n\nWhile we would like to highlight the fact that you only need one line of code for training and explaining your models with XAISuite, our main contribution is a novel algorithm that outputs a similarity value between two ordered vectors containing the outputs of machine learning explainers. \n\nBut first, what are explainers? Machine learning models are opaque models, so we have no idea what's going on inside of them. Explainers help us understand machine learning models we have trained and therefore give us aa better idea of why machine learning models fail in particular instances.\n\nXAISuite accomplishes machine learning model training and explanation generation in three steps: (1) data loading, (2) data processing, and (3) model training and explanation generation. Each of these steps are delved into more detail in our [documentation](https://11301858.github.io/XAISuite), in the demo tutorials, and are overviewed in the graphic below: \n\n\n![A schematic of XAISuite functionalities](https://github.com/11301858/XAISuite/assets/66180831/b45ca3b3-10d3-458a-a2c6-6d25bc5abbd8)\n\n\nA key part of XAISuite is flexibility, and, in our mission to make machine learning available to all, we have made XAISuite available in the following formats:\n\n1. As a Python Library (with XAISuite and XAISuiteGUI)\n2. On the Command Line (with XAISuiteCLI)\n3. In block-code (with XAISuiteBlock)\n\n\n*A note on formats: XAISuiteCLI and XAISuiteGUI run on v1.0.8. This will not change in the near future.* \n\n\nAs far as we know, XAISuite is among the first comprehensive libraries that allow users to both train and explain models, and the first to provide utilities for explanation comparison. XAISuite was created with a focus on users, and our interface reflects that. We also pioneered the ability to interact with machine learning models on the command line.\n\n\n## Installation\n\nYou can install the ``XAI Suite`` through PyPI:\n\n``\npip install XAISuite\n``\n\nThis will automatically install the latest version and is the reccomended way to download the library. The version on Github may not be stable. If yu already have XAISuite and want to upgrade it, do:\n\n``\npip install XAISuite --upgrade\n``\nFollow the instructions in individual folder READMEs for further installation instructions. For example, to install the command-line tool for XAISuite, do\n\n\n``\nbrew install xaisuitecli\n``\n\nXAISuite 2.0.0 is not backward-compatible with XAISuite 1.0.8. If you want to install version 1.0.8, simply type:\n``\npip install XAISuite==1.0.8\n``\n\n## Getting Started\n\nFor comprehensive example code and an introduction to the library, see the Demo Folder. The Demo folder is never fully complete and we will add more and more tutorials as the project progresses.\n\nIf you are looking for a model or dataset to use, [sklearn](https://scikit-learn.org/stable/) has several cool options.\n\nExamples of graphs and tables generated by the XAISuite version 1.0.8 can be found [here](https://drive.google.com/drive/u/2/folders/10t4_GYDPJl2sM9hDOuezbum-yqKpN4fc).\n\nFollow the instructions in individual folder READMEs for further installation instructions.\n\nBelow, we include an example of explaining a Support Vector Classifier Model as a demonstration of what XAISuite can accomplish.\n\n```python\nfrom xaisuite import*\nfrom sklearn.svm import*\n\nz = DataLoader(make_classification, n_samples = 700)\ny = DataProcessor(z, processor = \"TabularTransform\")\nx = ModelTrainer(SVC(), y, explainers = {\"lime\": {\"feature_selection\": \"none\"}, \"shap\": {}})\nx.getExplanationsFor([])[\"lime\"].ipython_plot(20)\na = InsightGenerator(x.getExplanationsFor([]))\ncorr = a.calculateExplainerSimilarity(\"lime\", \"shap\")\n\n#You can condense this in one line\n\ncorr = InsightGenerator(ModelTrainer(SVC(), DataProcessor(DataLoader(make_classification, n_samples = 700) , processor = \"TabularTransform\"), explainers = {\"lime\": {\"feature_selection\": \"none\"}, \"shap\":{}}).getExplanationsFor([])).calculateExplainerSimilarity(\"lime\", \"shap\")\n```\n\nFor example involving PyTorch, SciKeras, and custom models, check out the tutorials and example code in the Demo folder. \n\n## How to Contribute\n\nWe welcome the contribution from the open-source community to improve the library!\n\nTo add a new functionality into the library or point out a flaw, please create a new issue on Github. We'll try to look into your requests as soon as we can. Keep in mind that, as this is an open-source project, you release any copyright protection over code you may contribute to the XAISuite Project.\n\n## Technical Report and Citing XAISuite\nUse the following BibTex to cite XAISuite:\n\nFor XAISuite v1.0.8:\n```\n@misc{mitra2023xaisuite,\n      title={The XAISuite framework and the implications of explanatory system dissonance}, \n      author={Shreyan Mitra and Leilani Gilpin},\n      year={2023},\n      eprint={2304.08499},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG}\n}\n```\nFor XAISuite v2.0:\n```\n@misc{mitra2023xaisuite,\n      title={Paper pending}, \n      author={Shreyan Mitra and Leilani Gilpin},\n      year={2023},\n      eprint={},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG}\n}\n```\n\n\n## Contact Us\nIf you have any questions, comments or suggestions, please do not hesitate to contact us at xaisuite@gmail.com \n",
    "bugtrack_url": null,
    "license": "",
    "summary": "XAISuite: Training and Explanation Generation Utilities for Machine Learning Models",
    "version": "2.9.2",
    "project_urls": {
        "Homepage": "https://github.com/11301858/XAISuite"
    },
    "split_keywords": [
        "xai",
        "explainable",
        "ai",
        "explanation",
        "machine",
        "learning",
        "models"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8330713618e3337b94d94c5124346d8339ef2dc9cd86ad023a83850680be2d71",
                "md5": "a20059278b371924f88669de9ecee7e3",
                "sha256": "679afaec71af731cfa03c2cfacfb2422636c6827cbe81d0372cb55b90084a227"
            },
            "downloads": -1,
            "filename": "XAISuite-2.9.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a20059278b371924f88669de9ecee7e3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18158,
            "upload_time": "2023-09-05T01:21:29",
            "upload_time_iso_8601": "2023-09-05T01:21:29.495842Z",
            "url": "https://files.pythonhosted.org/packages/83/30/713618e3337b94d94c5124346d8339ef2dc9cd86ad023a83850680be2d71/XAISuite-2.9.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "901cfc7e98bb559101038bd37034ca91537a250d40a783c3bd70d4d991add543",
                "md5": "eedf41e791540807de25b71910076b01",
                "sha256": "8bac29d61c7eab868cfc94db31f5d0cb209491125d170584b0b033ce5e7c3bf9"
            },
            "downloads": -1,
            "filename": "XAISuite-2.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "eedf41e791540807de25b71910076b01",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15333,
            "upload_time": "2023-09-05T01:21:31",
            "upload_time_iso_8601": "2023-09-05T01:21:31.055314Z",
            "url": "https://files.pythonhosted.org/packages/90/1c/fc7e98bb559101038bd37034ca91537a250d40a783c3bd70d4d991add543/XAISuite-2.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-05 01:21:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "11301858",
    "github_project": "XAISuite",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "xaisuite"
}
        
Elapsed time: 0.13414s