Collective Observation on Causal Inference
Project description
COCI
Collective Observation on Causal Inferences
Coci makes it easy to observe the changes in predictions from machine learning models based on the alterations of feature values.
Why Coci?
Machine learning has always been understood as a black box algorithm, which makes the decision makers hesitant to trust the predictions from this approach.
Shap and Lime has unveiled a lot of mysteries around the effects of the presence of each feature on outcomes. However, these methods cannot show the change in outcomes when features are tweaked.
Coci takes it a step further, and reveals the effects on outcomes when changing feature values.
Installation
pip install coci==0.1.7
Summary Plot
Sample code
import coci
explainer = coci.TreeExplainer(model)
explainer.sensitivity(X_test,
feature_names=feature_names,
split_num=2,
sample_size=300)
explainer.summary_plot(max_display=10)
Reading the summary plot
Trend Plot
Sample code
import coci
explainer = coci.TreeExplainer(model)
explainer.sensitivity(X_test,
feature_names=feature_names,
split_num=2,
sample_size=300)
explainer.trend_plot(feature_name=['要介護認定等基準時間(食事)'])
## or show by index
explainer.trend_plot(feature_index=[1276])
## or show the top ranked features
explainer.trend_plot(max_display=10)
Reading the trend plot
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 coci-0.2.0.tar.gz
.
File metadata
- Download URL: coci-0.2.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1461a463d75f4a7fb1830d0ed7d0767cde27e9e48974e4d2a3a2bad1cd7a2f8 |
|
MD5 | 4c5c69ca13c23cd20782541129fc2bf5 |
|
BLAKE2b-256 | 4ea9476ca11da803ee10f6b6d6c5f0714d4fb6bf06473b7084510c92d86acfb7 |
File details
Details for the file coci-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: coci-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f2d0f083b2d96440176a3e73fec96cb1b0cee3b77ae50e0951160d70791828e |
|
MD5 | 277de8e98fe8ca0b5c4f5d125dd985e9 |
|
BLAKE2b-256 | 6efe1b227f1290c665f6ec46ce5e3504cf03b37c695ea0fa312aa20bc1b32526 |