ClarivueXAI: Unified Explainable AI Framework
ClarivueXAI is a Python library for explainable AI, providing a unified API to explain models across frameworks (scikit-learn, TensorFlow, PyTorch, custom) and data types (tabular, text, images, time series). Problem Explainable AI is fragmented, with different tools for different models and data types, leading to inconsistent APIs and slower workflows for data scientists and ML engineers. Solution ClarivueXAI unifies XAI with:
A consistent API for all model types and explanation methods. Support for multiple frameworks and data types. Global and local explanations using methods like SHAP, LIME, and Integrated Gradients. Advanced visualization tools, including interactive plots.
See Examples for detailed demonstrations. Key Features
Unified API: Consistent interface for all models. Multi-modal Support: Handles tabular, text, image, and time series data. Framework Agnostic: Supports scikit-learn, TensorFlow, PyTorch, and custom models. Global & Local Explanations: Model-level and instance-level insights. Advanced Visualization: Static and interactive plots, as shown in Wine Classification.
Installation
Base installation
pip install clarivuexai
TensorFlow support
pip install clarivuexai[tensorflow]
PyTorch support
pip install clarivuexai[torch]
All dependencies
pip install clarivuexai[all]
Quick Example This example, inspired by Random Forest Example, shows how to explain a scikit-learn model: from clarivuexai import Model, Explainer from sklearn.ensemble import RandomForestClassifier from sklearn.datasets import load_iris import matplotlib.pyplot as plt
Load data
iris = load_iris() X, y = iris.data, iris.target
Train model
model = RandomForestClassifier(n_estimators=100, random_state=42) model.fit(X, y)
Wrap with ClarivueXAI
cxai_model = Model.from_sklearn(model, feature_names=iris.feature_names)
Create explainer
explainer = Explainer(cxai_model)
Get explanations
global_exp = explainer.explain_global(X, method='shap') local_exp = explainer.explain_local(X[0:1], method='shap')
Visualize
plt.figure(figsize=(10, 6)) global_exp.plot() plt.title("Global SHAP Feature Importance") plt.tight_layout() plt.savefig("global_shap.png")
Documentation Full documentation is available at clarivuexai.readthedocs.io. Key sections:
Quickstart Guide: Basic setup. API Reference: Detailed API docs. Examples: Use cases for tabular, text, image, and time series data.
Contributing Contributions are welcome! Submit a Pull Request on GitHub. License Licensed under the MIT License. See the LICENSE file.
Metadata
Release files for clarivuexai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clarivuexai-0.1.0.tar.gz | 55.7 kB | Without provenance | Details for clarivuexai-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clarivuexai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for clarivuexai-0.1.0-py3-none-any.whl |
Total release size: 115.2 kB
Release files / clarivuexai-0.1.0.tar.gz
| Download URL | clarivuexai-0.1.0.tar.gz |
|---|---|
| Size | 55.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d520f7b322b01f954186202494af4e4a3222005eb87a8abd295016c64f122b36
|
|
BLAKE2b-256 checksum How to use checksums |
4abcb2dff676ac857c54a1cf1125e2b2878601006b75afe3a1cff29d97b438ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / clarivuexai-0.1.0-py3-none-any.whl
| Download URL | clarivuexai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 59.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50f85d1765b270fe4c49ed1e07816dbdac01c114720ae366c985853c3a5bc1a1
|
|
BLAKE2b-256 checksum How to use checksums |
faef153c87a16fd164a060bd5bfe02fda3899e697fe986fe05bda4497879bdfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for clarivuexai 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.