Analyze machine learning model reliability beyond accuracy.
Project description
Your model has 92% accuracy. That may still be unsafe.
TrustLens is an open-source Python library for evaluating model reliability beyond accuracy and producing deployment-ready decisions.
Why TrustLens
Most model evaluations stop at accuracy, AUC, or F1. Deployment decisions require more:
- Can we trust model probabilities?
- Are failures concentrated in high-confidence regions?
- Is performance uneven across sensitive groups?
- Are we shipping a model with hidden reliability risk?
TrustLens answers these questions in one pipeline and produces:
- module-level diagnostics (calibration, failure, bias, representation)
- a composite Trust Score (0-100)
- penalty and blocker reasoning
- a deployment verdict suitable for review and CI gating
Quickstart
Install
pip install trustlens
Analyze a Model
from trustlens import analyze
report = analyze(model, X_test, y_test, y_prob=model.predict_proba(X_test))
report.show()
Example Output
TRUST SCORE: 88/100 [B]
Assessment : Good Trust - minor issues to address
Score Summary:
Base Score : 92
Penalties Applied : -4.0 [Calibration (-4.0)]
Final Score : 88
Compare Candidates
from trustlens import compare
compare([report_model_a, report_model_b, report_model_c])
Export Artifacts
report.save("report.json") # machine-readable
report.save("report.txt") # human-readable
report.save("trust_report") # full bundle with plots + metadata
One-Line Demo
from trustlens import quick_analyze
quick_analyze(dataset="breast_cancer")
Contributors
|
Khanz9664 |
jayssSmm |
WeiGuang-2099 |
CrepuscularIRIS |
komoike-oss28-ui |
sidharth-vijayan |
MustansirNisar |
Want to see your name here? Start with a good first issue.
Citation
If you use TrustLens in research or production, cite:
@software{trustlens2026,
author = {Shahid Ul Islam},
title = {TrustLens: Debug your ML models beyond accuracy},
year = {2026},
url = {https://github.com/Khanz9664/TrustLens},
}
Author
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trustlens-0.3.0.tar.gz.
File metadata
- Download URL: trustlens-0.3.0.tar.gz
- Upload date:
- Size: 80.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d453ce819ab274c27852e48bbfd67a219e0f3f8e27828252602c4afeb25f755
|
|
| MD5 |
cd0910463751c7baddf45fd07fe08c27
|
|
| BLAKE2b-256 |
bd50077e54c8804c856dda3c201ff1dcccedd05708445cf5364c6250d45aaff9
|
File details
Details for the file trustlens-0.3.0-py3-none-any.whl.
File metadata
- Download URL: trustlens-0.3.0-py3-none-any.whl
- Upload date:
- Size: 70.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77abc272fbdfb3c83c7c92f939397a9b59bb7a471d5ca678bfad7c51e32ca352
|
|
| MD5 |
e86abdfacad052fdb878fae49c544e12
|
|
| BLAKE2b-256 |
772c46e8232e8c5ae87dd727d47c7a7294885c74673a72edf81c0793650812a1
|