Skip to main content

Thinxai

A CLI tool for explaining deep learning models. Provide it with a trained model + training dataset with target and it generates a PDF report telling what drives predictions and why.

Install

pip install thinxai-II

With extras:

pip install thinxai[tensorflow]  
pip install thinxai[gpu]          
pip install thinxai[all]           

Quick Start

  1. Place your model file and CSV dataset in the same folder
  2. Run:
thinxai

Or:

python -m thinxai
  1. Select your model and dataset from the interactive menu
  2. Find the PDF report in the same folder

Supported Inputs

Deep Learning Models: PyTorch (.pth, .pt, .pkl), TensorFlow/Keras (.h5, .hdf5, .keras, SavedModel), Transformers (BERT, GPT, etc.), ONNX (.onnx)

Also Supported: Scikit-learn (.pkl, .joblib)

Data: CSV, tab-delimited, pipe-delimited

What It Does

Thinxai runs multiple explainability methods on your model and combines the results into a single ranked list. It then generates plain English explanations for the top features and packages everything into a PDF report.

Analysis Pipeline

  • Permutation Importance: shuffles each feature and measures accuracy drop
  • SHAP Values: game-theoretic attribution per prediction
  • Integrated Gradients: gradient-based attribution along the input path
  • Statistical Tests: mutual information and F-scores
  • Built-in Importance: model native scores when available

These are merged into a consensus score. Features that rank highly across multiple methods get higher confidence.

Explanations

Top features are explained by a cascade LLM system:

  • Groq API: Primary
  • HuggingFace fallback: Secondary
  • Rule-based fallback: Always works

Each explanation includes a business insight

PDF Report Contents

  • Cover page with model validation metrics and trust indicator
  • Feature importance distribution pie chart
  • Each feature gets explanation cards with business insights
  • Executive summary with the top 3 features
  • Technical glossary automatically generated from terms found in the report

Trust Indicators

The tool flags suspicious results:

  • Accuracy >99%: warns about possible data leakage
  • Accuracy near random: warns model may not have learned patterns
  • Raw state_dict models: skips validation, runs statistical analysis only

Requirements

  • Python 3.8+

Metadata

Release files for Thinxai-II 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Thinxai-II 0.0.2
File Size Uploaded
thinxai_ii-0.0.2.tar.gz 72.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Thinxai-II 0.0.2
File Interpreter ABI Platform
thinxai_ii-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 145.9 kB

Release files / thinxai_ii-0.0.2.tar.gz

Download URL thinxai_ii-0.0.2.tar.gz
Size 72.7 kB
Tags Source
SHA-256 checksum
How to use checksums
14e614f6ede30a77eea9f7b74e58ea478e5e7c284bbf538eca55e53f7ecc6f02
BLAKE2b-256 checksum
How to use checksums
ecc59ca0bfc963fa920bb7881ac5ed9186cdea054a08152180522f853858f38d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Release files / thinxai_ii-0.0.2-py3-none-any.whl

Download URL thinxai_ii-0.0.2-py3-none-any.whl
Size 73.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
163f1d5844cb869a10400ae6f23e962a56f5b34376fa289be8f07673811cd3de
BLAKE2b-256 checksum
How to use checksums
33667a749d9f3c7d6470dd8ecb4579c871260b5ef40d6cd9be13d39bc7c70fe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page