FOCUS is a python package for generating counterfactual explanations for a tree-based model
Project description
Deployment & Documentation & Stats & License
This library is an implementation of FOCUS: Flexible Optimizable Counterfactual Explanations for Tree Ensembles.
FOCUS generates optimal distance counterfactual explanations to the original data for all the instances in tree‐based machine learning models.
FOCUS counterfactual explanation generation with 3 Lines of Code:
from focus import Focus
# Initialize Focus instance with default values
focus = Focus()
# Generate counterfactual explanations for given tree model and features
pertubed = focus.generate(tree_model, X)
Installation
It is recommended to use pip or conda for installation. Please make sure the latest version is installed:
pip install focus-cfe # normal install
pip install --upgrade focus-cfe # or update if needed
conda install -c conda-forge focus-cfe
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file focus-cfe-0.0.dev1.tar.gz
.
File metadata
- Download URL: focus-cfe-0.0.dev1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e76433d0c1c3ec30121098e377553502d2cf9cbed2e30855c4752e00b3c7f22e |
|
MD5 | 3a66678668797433800e0a4119499a7e |
|
BLAKE2b-256 | 9b12e0745ada36eb0292a7c180544045b47785afcb678ba74ab5ca06ed5a7c73 |
File details
Details for the file focus_cfe-0.0.dev1-py3-none-any.whl
.
File metadata
- Download URL: focus_cfe-0.0.dev1-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1cb424fe745db5d67e2b67c69278e1712d716c3abe187eee2c8da69e0e5850 |
|
MD5 | 56c90e4d8c5cecc70ebba63241cb9375 |
|
BLAKE2b-256 | ce183f9e4ced14a6487d58cc629e3290025d2aad13fe0b21313378b5afc5a13a |