Random Forest counterfactual explanation
Project description
Random forest counterfactuals
The RFC is a library specialised to be use in the domain of Explainable Artificial Intelligence (XAI).
It allows to search for an explanation for pretrained Random Forest Classifier model (from scikit-learn library) in the form of counterfactual examples.
The library also allow to specify constraints (frozen attribute, monotonnicity) for attributes in the specified dataset.
An algorithm is an extended version of Gabriele Tolomei et al. algorithm (link to github).
An extended version has:
-
multiclass classification problem's explainability,
-
gives new methods of selecting counterfactual examples,
-
provides new distance functions (specially HOEM)
-
it is optimized to provide explanation as fast as possible with multiprocessing calculation
This work is done for purpose of my master's thesis.
Installation
This package was tested only on Windows platform. However it should work on Linux platform as well.
To install package:
pip install rf_counterfactuals
Manual installation (for developers)
To build up a pywheel file:
python setup.py bdist_whee
Example
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rf_counterfactuals-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e8081db38ec7bd8c4da678651f50cb50b754fb2c73950e56c8d7246f4fba647 |
|
MD5 | 278b631a8c641d76f5672a3fd6a5251f |
|
BLAKE2b-256 | 4fe6330aa919af8dfb5d04c39240b943cc971fb461052dfc44157c7da56d3867 |