XAI-Analytics is a tool that opens the black-box of machine learning. It makes model interpretability easy. XAI-Analytics offers a wide range of features such as data visualization, data preprocessing, ML-model training and global and local ML-model interpreting. The interactive Jupyter Notebook offers an user-friendly interface that gives the user full control over the tool. For a quick demo of XAI-Analytics jump to the demo section. For examples please refer to examples.
- Start the binder notebook server by clicking here
- Run XAI-Analytics.ipynb notebook file
-
Clone the XAI-Analytics repository: https://github.com/Batev/XAI-Analytics.git
-
Navigate to checkout directory in Bash or Powershell and ...
-
Unix
# (Optional) Create a new virtual environment $> python3 -m venv venv # Start the virtual environment, e.g. venv $> source venv/bin/activate # Install project requirements $> pip3 install -r requirements.txt # Modules with outdated dependencies (e.g. Skater on wordcloud==1.3.1), that are erroneous when installed with pip. $> pip3 install --no-dependencies --no-cache-dir -r requirements-no-deps.txt # Skater only supports scikit-learn<=0.22.2.post1 but other modules require scikit-learn>=0.23.1, therefore this workaround is necessary. $> find . -name 'tree_visualizer.py' -exec sed -i 's/from sklearn.externals.six import StringIO/from six import StringIO/g' {} + # Start notebook server $> jupyter notebook
-
Windows (PowerShell)
# (Optional) Create a new virtual environment $> python -m venv venv # Start the virtual environment, e.g. venv $> set-executionpolicy RemoteSigned -Scope CurrentUser $> .\venv\Scripts\activate # Install project requirements $> pip install -r requirements.txt # Modules with outdated dependencies (e.g. Skater on wordcloud==1.3.1), that are erroneous when installed with pip. $> pip install --no-dependencies --no-cache-dir -r requirements-no-deps.txt # Skater only supports scikit-learn<=0.22.2.post1 but other modules require scikit-learn>=0.23.1, therefore this workaround is necessary. If you use python 3.7 or 3.8 the path to skater should be adjusted accordingly, e.g. ...skater-1.1.2-py3.9.egg... $> (Get-Content venv\Lib\site-packages\skater-1.1.2-py3.9.egg\skater\core\visualizer\tree_visualizer.py) | %{$_ -replace "from sklearn.externals.six import StringIO", "from six import StringIO"} | Set-Content venv\Lib\site-packages\skater-1.1.2-py3.9.egg\skater\core\visualizer\tree_visualizer.py # Start notebook server $> jupyter notebook
-
-
Default browser will be started in current directory
-
Run XAI-Analytics.ipynb notebook file
- Python >= 3.7* and <= 3.9*
- Microsoft Visual C++ > 14.0 (Windows only)
Please refer to the requirements file for a list of the python module prerequisites. The file excludes XAI, Skater and PDPbox because of incompatible versions in the dependencies when started with binder. The requirements.txt is auto-generated from requirements.in (which consists of the raw dependencies) using pip-compile. For using locally with all required modules please refer to the Run locally step.
v1.0
Example notebooks can be found in examples. Quick HTML overview of the example notebooks:
Error when training a model on a dataset without any categorical columns (or only one categorical column that is the target)-> Fixed by b87a276.Internal PDPBox error when plotting a PDP: SauceCat/PDPbox#40-> Workaround by 6143001.- Skater cannot be installed with pip: amueller/word_cloud#134 and https://github.com/oracle/Skater/issues/308
Not all interpretation techniques work with XGBoost.Only ELI5 does not work with XGBoost -> until this pull request is merged.
Add XAI-Analytics to A gallery of interesting Jupyter Notebooks when ALPHA version is released.- Add auto-generated adversarial examples to some dataset.
Fix XGBoost interpretations bug.- Add option for removing features from a dataset in the preprocessing step.
- Add option for normalizing/removing unknown values from a dataset in the preprocessing step.
- Add custom exceptions and raise them where needed.
- Improve logging -> do not show info messages in the notebooks, use display instead. Add more debug messages.
- Support for semi-supervised, unsupervised and reinforcement learning.
- Model interpretation of regression algorithms.
This project was created by Evgeni Batev under the supervision of Ao.univ.Prof. Dr. Andreas Rauber at the Vienna University of Technology.