Thinxai 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
thinxai-1.0.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thinxai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ include README.md
2
+ include LICENSE
3
+ recursive-include thinxai *.py
thinxai-1.0.2/PKG-INFO ADDED
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.4
2
+ Name: Thinxai
3
+ Version: 1.0.2
4
+ Summary: AI Model Explainability and Interpretability Tool
5
+ Author: Thinxai Team
6
+ Author-email: Thinxai Team <fyp9446@gmail.com>
7
+ License: MIT
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: numpy>=1.21.0
23
+ Requires-Dist: pandas>=1.3.0
24
+ Requires-Dist: matplotlib>=3.4.0
25
+ Requires-Dist: seaborn>=0.11.0
26
+ Requires-Dist: scikit-learn>=1.0.0
27
+ Requires-Dist: torch>=2.0.0
28
+ Requires-Dist: transformers>=4.30.0
29
+ Requires-Dist: shap>=0.42.0
30
+ Requires-Dist: captum>=0.6.0
31
+ Requires-Dist: groq>=0.4.0
32
+ Requires-Dist: tqdm>=4.62.0
33
+ Requires-Dist: psutil>=5.8.0
34
+ Provides-Extra: tensorflow
35
+ Requires-Dist: tensorflow>=2.12.0; extra == "tensorflow"
36
+ Provides-Extra: gpu
37
+ Requires-Dist: torch[cuda]; extra == "gpu"
38
+ Provides-Extra: all
39
+ Requires-Dist: tensorflow>=2.12.0; extra == "all"
40
+ Requires-Dist: torch[cuda]; extra == "all"
41
+ Dynamic: author
42
+ Dynamic: license-file
43
+ Dynamic: requires-python
44
+
45
+ # Thinxai
46
+
47
+ 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.
48
+
49
+ ## Install
50
+
51
+ ```bash
52
+ pip install thinxai
53
+ ```
54
+
55
+ With extras:
56
+
57
+ ```bash
58
+ pip install thinxai[tensorflow] # TensorFlow/Keras models
59
+ pip install thinxai[gpu] # GPU acceleration
60
+ pip install thinxai[all] # all extras
61
+ ```
62
+
63
+ ## Quick Start
64
+
65
+ 1. Place your model file and CSV dataset in the same folder
66
+ 2. Run:
67
+
68
+ ```bash
69
+ thinxai
70
+ ```
71
+
72
+ Or:
73
+
74
+ ```bash
75
+ python -m thinxai
76
+ ```
77
+
78
+ 3. Select your model and dataset from the interactive menu
79
+ 4. Find the PDF report in the same folder
80
+
81
+ ## Supported Inputs
82
+
83
+ **Deep Learning Models:** PyTorch (.pth, .pt, .pkl), TensorFlow/Keras (.h5, .hdf5, .keras, SavedModel), Transformers (BERT, GPT, etc.), ONNX (.onnx)
84
+
85
+ **Also Supported:** Scikit-learn (.pkl, .joblib)
86
+
87
+ **Data:** CSV, tab-delimited, pipe-delimited
88
+
89
+ ## What It Does
90
+
91
+ 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.
92
+
93
+ ### Analysis Pipeline
94
+
95
+ - **Permutation Importance**: shuffles each feature and measures accuracy drop
96
+ - **SHAP Values**: game-theoretic attribution per prediction
97
+ - **Integrated Gradients**: gradient-based attribution along the input path
98
+ - **Statistical Tests**: mutual information and F-scores
99
+ - **Built-in Importance**: model native scores when available
100
+
101
+ These are merged into a **consensus score**. Features that rank highly across multiple methods get higher confidence.
102
+
103
+ ### Explanations
104
+
105
+ Top features are explained by a **cascade LLM system**:
106
+
107
+ - **Groq API**: Primary
108
+ - **HuggingFace fallback**: Secondary
109
+ - **Rule-based fallback**: Always works
110
+
111
+ Each explanation includes a **business insight**
112
+
113
+ ### PDF Report Contents
114
+
115
+ - Cover page with model validation metrics and trust indicator
116
+ - Feature importance distribution pie chart
117
+ - Each feature gets explanation cards with business insights
118
+ - Executive summary with the top 3 features
119
+ - Technical glossary automatically generated from terms found in the report
120
+
121
+ ### Trust Indicators
122
+
123
+ The tool flags suspicious results:
124
+
125
+ - **Accuracy >99%**: warns about possible data leakage
126
+ - **Accuracy near random**: warns model may not have learned patterns
127
+ - **Raw state_dict models**: skips validation, runs statistical analysis only
128
+
129
+ ## Requirements
130
+
131
+ - Python 3.8+
132
+ - See `setup.py` for full dependency list
133
+
134
+ ## Documentation
135
+
136
+ - `README.md` — this file
137
+ - `QUICKREF.md` — how to run this
138
+ - `LICENSE` — MIT License
@@ -0,0 +1,94 @@
1
+ # Thinxai
2
+
3
+ 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.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install thinxai
9
+ ```
10
+
11
+ With extras:
12
+
13
+ ```bash
14
+ pip install thinxai[tensorflow] # TensorFlow/Keras models
15
+ pip install thinxai[gpu] # GPU acceleration
16
+ pip install thinxai[all] # all extras
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ 1. Place your model file and CSV dataset in the same folder
22
+ 2. Run:
23
+
24
+ ```bash
25
+ thinxai
26
+ ```
27
+
28
+ Or:
29
+
30
+ ```bash
31
+ python -m thinxai
32
+ ```
33
+
34
+ 3. Select your model and dataset from the interactive menu
35
+ 4. Find the PDF report in the same folder
36
+
37
+ ## Supported Inputs
38
+
39
+ **Deep Learning Models:** PyTorch (.pth, .pt, .pkl), TensorFlow/Keras (.h5, .hdf5, .keras, SavedModel), Transformers (BERT, GPT, etc.), ONNX (.onnx)
40
+
41
+ **Also Supported:** Scikit-learn (.pkl, .joblib)
42
+
43
+ **Data:** CSV, tab-delimited, pipe-delimited
44
+
45
+ ## What It Does
46
+
47
+ 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.
48
+
49
+ ### Analysis Pipeline
50
+
51
+ - **Permutation Importance**: shuffles each feature and measures accuracy drop
52
+ - **SHAP Values**: game-theoretic attribution per prediction
53
+ - **Integrated Gradients**: gradient-based attribution along the input path
54
+ - **Statistical Tests**: mutual information and F-scores
55
+ - **Built-in Importance**: model native scores when available
56
+
57
+ These are merged into a **consensus score**. Features that rank highly across multiple methods get higher confidence.
58
+
59
+ ### Explanations
60
+
61
+ Top features are explained by a **cascade LLM system**:
62
+
63
+ - **Groq API**: Primary
64
+ - **HuggingFace fallback**: Secondary
65
+ - **Rule-based fallback**: Always works
66
+
67
+ Each explanation includes a **business insight**
68
+
69
+ ### PDF Report Contents
70
+
71
+ - Cover page with model validation metrics and trust indicator
72
+ - Feature importance distribution pie chart
73
+ - Each feature gets explanation cards with business insights
74
+ - Executive summary with the top 3 features
75
+ - Technical glossary automatically generated from terms found in the report
76
+
77
+ ### Trust Indicators
78
+
79
+ The tool flags suspicious results:
80
+
81
+ - **Accuracy >99%**: warns about possible data leakage
82
+ - **Accuracy near random**: warns model may not have learned patterns
83
+ - **Raw state_dict models**: skips validation, runs statistical analysis only
84
+
85
+ ## Requirements
86
+
87
+ - Python 3.8+
88
+ - See `setup.py` for full dependency list
89
+
90
+ ## Documentation
91
+
92
+ - `README.md` — this file
93
+ - `QUICKREF.md` — how to run this
94
+ - `LICENSE` — MIT License
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.4
2
+ Name: Thinxai
3
+ Version: 1.0.2
4
+ Summary: AI Model Explainability and Interpretability Tool
5
+ Author: Thinxai Team
6
+ Author-email: Thinxai Team <fyp9446@gmail.com>
7
+ License: MIT
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: numpy>=1.21.0
23
+ Requires-Dist: pandas>=1.3.0
24
+ Requires-Dist: matplotlib>=3.4.0
25
+ Requires-Dist: seaborn>=0.11.0
26
+ Requires-Dist: scikit-learn>=1.0.0
27
+ Requires-Dist: torch>=2.0.0
28
+ Requires-Dist: transformers>=4.30.0
29
+ Requires-Dist: shap>=0.42.0
30
+ Requires-Dist: captum>=0.6.0
31
+ Requires-Dist: groq>=0.4.0
32
+ Requires-Dist: tqdm>=4.62.0
33
+ Requires-Dist: psutil>=5.8.0
34
+ Provides-Extra: tensorflow
35
+ Requires-Dist: tensorflow>=2.12.0; extra == "tensorflow"
36
+ Provides-Extra: gpu
37
+ Requires-Dist: torch[cuda]; extra == "gpu"
38
+ Provides-Extra: all
39
+ Requires-Dist: tensorflow>=2.12.0; extra == "all"
40
+ Requires-Dist: torch[cuda]; extra == "all"
41
+ Dynamic: author
42
+ Dynamic: license-file
43
+ Dynamic: requires-python
44
+
45
+ # Thinxai
46
+
47
+ 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.
48
+
49
+ ## Install
50
+
51
+ ```bash
52
+ pip install thinxai
53
+ ```
54
+
55
+ With extras:
56
+
57
+ ```bash
58
+ pip install thinxai[tensorflow] # TensorFlow/Keras models
59
+ pip install thinxai[gpu] # GPU acceleration
60
+ pip install thinxai[all] # all extras
61
+ ```
62
+
63
+ ## Quick Start
64
+
65
+ 1. Place your model file and CSV dataset in the same folder
66
+ 2. Run:
67
+
68
+ ```bash
69
+ thinxai
70
+ ```
71
+
72
+ Or:
73
+
74
+ ```bash
75
+ python -m thinxai
76
+ ```
77
+
78
+ 3. Select your model and dataset from the interactive menu
79
+ 4. Find the PDF report in the same folder
80
+
81
+ ## Supported Inputs
82
+
83
+ **Deep Learning Models:** PyTorch (.pth, .pt, .pkl), TensorFlow/Keras (.h5, .hdf5, .keras, SavedModel), Transformers (BERT, GPT, etc.), ONNX (.onnx)
84
+
85
+ **Also Supported:** Scikit-learn (.pkl, .joblib)
86
+
87
+ **Data:** CSV, tab-delimited, pipe-delimited
88
+
89
+ ## What It Does
90
+
91
+ 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.
92
+
93
+ ### Analysis Pipeline
94
+
95
+ - **Permutation Importance**: shuffles each feature and measures accuracy drop
96
+ - **SHAP Values**: game-theoretic attribution per prediction
97
+ - **Integrated Gradients**: gradient-based attribution along the input path
98
+ - **Statistical Tests**: mutual information and F-scores
99
+ - **Built-in Importance**: model native scores when available
100
+
101
+ These are merged into a **consensus score**. Features that rank highly across multiple methods get higher confidence.
102
+
103
+ ### Explanations
104
+
105
+ Top features are explained by a **cascade LLM system**:
106
+
107
+ - **Groq API**: Primary
108
+ - **HuggingFace fallback**: Secondary
109
+ - **Rule-based fallback**: Always works
110
+
111
+ Each explanation includes a **business insight**
112
+
113
+ ### PDF Report Contents
114
+
115
+ - Cover page with model validation metrics and trust indicator
116
+ - Feature importance distribution pie chart
117
+ - Each feature gets explanation cards with business insights
118
+ - Executive summary with the top 3 features
119
+ - Technical glossary automatically generated from terms found in the report
120
+
121
+ ### Trust Indicators
122
+
123
+ The tool flags suspicious results:
124
+
125
+ - **Accuracy >99%**: warns about possible data leakage
126
+ - **Accuracy near random**: warns model may not have learned patterns
127
+ - **Raw state_dict models**: skips validation, runs statistical analysis only
128
+
129
+ ## Requirements
130
+
131
+ - Python 3.8+
132
+ - See `setup.py` for full dependency list
133
+
134
+ ## Documentation
135
+
136
+ - `README.md` — this file
137
+ - `QUICKREF.md` — how to run this
138
+ - `LICENSE` — MIT License
@@ -0,0 +1,15 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ setup.py
6
+ Thinxai.egg-info/PKG-INFO
7
+ Thinxai.egg-info/SOURCES.txt
8
+ Thinxai.egg-info/dependency_links.txt
9
+ Thinxai.egg-info/entry_points.txt
10
+ Thinxai.egg-info/not-zip-safe
11
+ Thinxai.egg-info/requires.txt
12
+ Thinxai.egg-info/top_level.txt
13
+ thinxai/__init__.py
14
+ thinxai/__main__.py
15
+ thinxai/thinxai.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ thinxai = thinxai.__main__:main
@@ -0,0 +1,22 @@
1
+ numpy>=1.21.0
2
+ pandas>=1.3.0
3
+ matplotlib>=3.4.0
4
+ seaborn>=0.11.0
5
+ scikit-learn>=1.0.0
6
+ torch>=2.0.0
7
+ transformers>=4.30.0
8
+ shap>=0.42.0
9
+ captum>=0.6.0
10
+ groq>=0.4.0
11
+ tqdm>=4.62.0
12
+ psutil>=5.8.0
13
+
14
+ [all]
15
+ tensorflow>=2.12.0
16
+ torch[cuda]
17
+
18
+ [gpu]
19
+ torch[cuda]
20
+
21
+ [tensorflow]
22
+ tensorflow>=2.12.0
@@ -0,0 +1 @@
1
+ thinxai
@@ -0,0 +1,52 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "Thinxai"
7
+ version = "1.0.2"
8
+ description = "AI Model Explainability and Interpretability Tool"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ requires-python = ">=3.8"
12
+ authors = [
13
+ {name = "Thinxai Team", email = "fyp9446@gmail.com"}
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Intended Audience :: Developers",
18
+ "Intended Audience :: Science/Research",
19
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.8",
23
+ "Programming Language :: Python :: 3.9",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ ]
28
+ dependencies = [
29
+ "numpy>=1.21.0",
30
+ "pandas>=1.3.0",
31
+ "matplotlib>=3.4.0",
32
+ "seaborn>=0.11.0",
33
+ "scikit-learn>=1.0.0",
34
+ "torch>=2.0.0",
35
+ "transformers>=4.30.0",
36
+ "shap>=0.42.0",
37
+ "captum>=0.6.0",
38
+ "groq>=0.4.0",
39
+ "tqdm>=4.62.0",
40
+ "psutil>=5.8.0",
41
+ ]
42
+
43
+ [project.optional-dependencies]
44
+ tensorflow = ["tensorflow>=2.12.0"]
45
+ gpu = ["torch[cuda]"]
46
+ all = ["tensorflow>=2.12.0", "torch[cuda]"]
47
+
48
+ [project.scripts]
49
+ thinxai = "thinxai.__main__:main"
50
+
51
+ [tool.setuptools]
52
+ packages = ["thinxai"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
thinxai-1.0.2/setup.py ADDED
@@ -0,0 +1,59 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+
6
+ setup(
7
+ name="Thinxai",
8
+ version="1.0.2",
9
+ author="Thinxai Team",
10
+ author_email="fyp9446@gmail.com",
11
+ description="AI Model Explainability and Interpretability Tool",
12
+ long_description=long_description,
13
+ long_description_content_type="text/markdown",
14
+
15
+ packages=find_packages(),
16
+ classifiers=[
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: Science/Research",
20
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.8",
24
+ "Programming Language :: Python :: 3.9",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ ],
29
+ python_requires=">=3.8",
30
+ install_requires=[
31
+ "numpy>=1.21.0",
32
+ "pandas>=1.3.0",
33
+ "matplotlib>=3.4.0",
34
+ "seaborn>=0.11.0",
35
+ "scikit-learn>=1.0.0",
36
+ "torch>=2.0.0",
37
+ "transformers>=4.30.0",
38
+ "shap>=0.42.0",
39
+ "captum>=0.6.0",
40
+ "groq>=0.4.0",
41
+ "tqdm>=4.62.0",
42
+ "psutil>=5.8.0",
43
+ ],
44
+ extras_require={
45
+ "tensorflow": ["tensorflow>=2.12.0"],
46
+ "gpu": ["torch[cuda]"],
47
+ "all": [
48
+ "tensorflow>=2.12.0",
49
+ "torch[cuda]",
50
+ ],
51
+ },
52
+ entry_points={
53
+ "console_scripts": [
54
+ "thinxai=thinxai.__main__:main",
55
+ ],
56
+ },
57
+ include_package_data=True,
58
+ zip_safe=False,
59
+ )
@@ -0,0 +1,7 @@
1
+ """ThinXAI - AI Model Explainability Tool"""
2
+
3
+ __version__ = "1.0.2"
4
+ __author__ = "Thinxai"
5
+
6
+
7
+ from .thinxai import main
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env python
2
+ """Entry point for python -m thinxai"""
3
+
4
+ from .thinxai import main
5
+
6
+ if __name__ == "__main__":
7
+ main()