hierophant
This Python library use the power of large language models to provide intuitive, human-readable explanations for the predictions made by machine learning models.
Features
- Support for scikit-learn and PyTorch models
- Integration with OpenAI's language models for explanation generation
- Works with both classification and regression models
from sklearn.ensemble import RandomForestClassifier
from sklearn.datasets import load_iris
from hierophant.explainer import Explainer
iris = load_iris()
X, y = iris.data, iris.target
random_forest = RandomForestClassifier()
random_forest.fit(X, y)
# Create an explainer
explainer = Explainer(random_forest, language_model="openai/gpt-4")
explanations = explainer.explain(X)
For more detailed usage, see our Jupyter notebooks in the examples/ directory.
Contributing
We welcome contributions! See our contribution guide for more details.
License
This project is licensed under the terms of the MIT license.
TODO
- Support for more model types: Currently, hierophant supports scikit-learn models. In the future, we aim to add support for other types of models, such as PyTorch and TensorFlow models.
- Support for Hugging Face models: In addition to scikit-learn models, we aim to add support for Hugging Face models. This would allow hierophant to generate explanations for a wide range of state-of-the-art natural language processing models.
- Improved explanation generation: The current explanation generation process is quite basic. We need to further refine this process to generate more detailed and useful explanations.
- Model inspection capabilities: For more complex models, we might need to add functionality to inspect the internal workings of the model. This could involve using model interpretation techniques like LIME or SHAP.
- Data preprocessing functionality: We may need to add functionality to preprocess the data before feeding it to the model or the explanation generation system.
- Postprocessing of explanations: After generating the explanations, we may want to add postprocessing steps to make the explanations more readable or understandable. This could include summarization, highlighting, or conversion to other formats.
- Testing: We need to add comprehensive testing to ensure the reliability and robustness of hierophant.
- Documentation: While we have made a start on documentation, we need to continue to expand and improve it.
- Examples and tutorials: We should create more example notebooks and tutorials demonstrating how to use hierophant with different types of data and models.
- Community engagement: As an open-source project, we want to encourage community involvement. We need to continue improving our contribution guidelines and fostering an inclusive and welcoming community.
Release files for hierophant 0.1.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hierophant-0.1.11.tar.gz | 9.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hierophant-0.1.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.7 kB
Release files / hierophant-0.1.11.tar.gz
| Download URL | hierophant-0.1.11.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ab15996192617f46446b050b3f8ecd9a8b29449465740d6ec9cfc04292ff6f6
|
|
BLAKE2b-256 checksum How to use checksums |
a6ce578f024f10331f56c0fd683c9c4096763a714691f44f7d29121fdb8213ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.9.16 Darwin/22.6.0
|
Release files / hierophant-0.1.11-py3-none-any.whl
| Download URL | hierophant-0.1.11-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c7b742e3b4242f67e2b2a418784b460627b1b68e6041fd3448e775ae39d4da5
|
|
BLAKE2b-256 checksum How to use checksums |
63403cbc9e7c3f417c1756952da0099c843028edf122e379b5703e91c91daa2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.9.16 Darwin/22.6.0
|