gpclarity 0.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.
Files changed (62) hide show
  1. gpclarity-0.0.2/.github/workflows/ci.yml +135 -0
  2. gpclarity-0.0.2/.github/workflows/format_check.yml +27 -0
  3. gpclarity-0.0.2/.github/workflows/publish.yml +52 -0
  4. gpclarity-0.0.2/.gitignore +62 -0
  5. gpclarity-0.0.2/.pre-commit-config.yaml +34 -0
  6. gpclarity-0.0.2/.readthedocs.yaml +31 -0
  7. gpclarity-0.0.2/CITATION.cff +26 -0
  8. gpclarity-0.0.2/LICENSE +37 -0
  9. gpclarity-0.0.2/MANIFEST.in +17 -0
  10. gpclarity-0.0.2/PKG-INFO +248 -0
  11. gpclarity-0.0.2/README.md +172 -0
  12. gpclarity-0.0.2/docs/Makefile +27 -0
  13. gpclarity-0.0.2/docs/_autosummary/.gitkeep +0 -0
  14. gpclarity-0.0.2/docs/_static/custom.css +27 -0
  15. gpclarity-0.0.2/docs/advanced/custom_scorers.rst +17 -0
  16. gpclarity-0.0.2/docs/advanced/index.rst +9 -0
  17. gpclarity-0.0.2/docs/advanced/integration_sklearn.rst +17 -0
  18. gpclarity-0.0.2/docs/advanced/performance_tuning.rst +13 -0
  19. gpclarity-0.0.2/docs/api.rst +8 -0
  20. gpclarity-0.0.2/docs/api_reference/data_influence.rst +25 -0
  21. gpclarity-0.0.2/docs/api_reference/exceptions.rst +20 -0
  22. gpclarity-0.0.2/docs/api_reference/hyperparam_tracker.rst +25 -0
  23. gpclarity-0.0.2/docs/api_reference/index.rst +52 -0
  24. gpclarity-0.0.2/docs/api_reference/model_complexity.rst +29 -0
  25. gpclarity-0.0.2/docs/api_reference/uncertainty_analysis.rst +28 -0
  26. gpclarity-0.0.2/docs/api_reference/utils.rst +35 -0
  27. gpclarity-0.0.2/docs/conf.py +162 -0
  28. gpclarity-0.0.2/docs/examples/basic_usage.py +37 -0
  29. gpclarity-0.0.2/docs/examples/index.rst +12 -0
  30. gpclarity-0.0.2/docs/index.rst +77 -0
  31. gpclarity-0.0.2/docs/installation.rst +62 -0
  32. gpclarity-0.0.2/docs/make.bat +33 -0
  33. gpclarity-0.0.2/docs/quickstart.rst +138 -0
  34. gpclarity-0.0.2/docs/requirements.txt +5 -0
  35. gpclarity-0.0.2/docs/user_guide/complexity_analysis.rst +137 -0
  36. gpclarity-0.0.2/docs/user_guide/data_influence.rst +125 -0
  37. gpclarity-0.0.2/docs/user_guide/gpclarity.rst +46 -0
  38. gpclarity-0.0.2/docs/user_guide/index.rst +13 -0
  39. gpclarity-0.0.2/docs/user_guide/kernel_interpretation.rst +81 -0
  40. gpclarity-0.0.2/docs/user_guide/kernel_summary.rst +35 -0
  41. gpclarity-0.0.2/docs/user_guide/optimization_tracking.rst +131 -0
  42. gpclarity-0.0.2/docs/user_guide/uncertainty_analysis.rst +123 -0
  43. gpclarity-0.0.2/examples/basic_tutorial.py +100 -0
  44. gpclarity-0.0.2/examples/emukit_integration.py +121 -0
  45. gpclarity-0.0.2/gpclarity/__init__.py +190 -0
  46. gpclarity-0.0.2/gpclarity/_version.py +3 -0
  47. gpclarity-0.0.2/gpclarity/data_influence.py +501 -0
  48. gpclarity-0.0.2/gpclarity/exceptions.py +46 -0
  49. gpclarity-0.0.2/gpclarity/hyperparam_tracker.py +718 -0
  50. gpclarity-0.0.2/gpclarity/kernel_summary.py +285 -0
  51. gpclarity-0.0.2/gpclarity/model_complexity.py +619 -0
  52. gpclarity-0.0.2/gpclarity/plotting.py +337 -0
  53. gpclarity-0.0.2/gpclarity/uncertainty_analysis.py +647 -0
  54. gpclarity-0.0.2/gpclarity/utils.py +411 -0
  55. gpclarity-0.0.2/pyproject.toml +75 -0
  56. gpclarity-0.0.2/tests/conftest.py +39 -0
  57. gpclarity-0.0.2/tests/test_data_influence.py +48 -0
  58. gpclarity-0.0.2/tests/test_hyperparam_tracker.py +48 -0
  59. gpclarity-0.0.2/tests/test_kernel_summary.py +56 -0
  60. gpclarity-0.0.2/tests/test_model_complexity.py +44 -0
  61. gpclarity-0.0.2/tests/test_uncertainty_analysis.py +51 -0
  62. gpclarity-0.0.2/tests/test_utils.py +51 -0
@@ -0,0 +1,135 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, develop]
6
+ tags: ['v*']
7
+ pull_request:
8
+ branches: [main]
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ test:
16
+ name: Test (Python ${{ matrix.python-version }})
17
+ runs-on: ubuntu-latest
18
+ timeout-minutes: 30
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
23
+
24
+ steps:
25
+ - name: Checkout repository
26
+ uses: actions/checkout@v4
27
+
28
+ - name: Verify LICENSE exists # ✅ Prevents cryptic hatchling errors
29
+ run: |
30
+ if [ ! -f LICENSE ]; then
31
+ echo "ERROR: LICENSE file not found. Create it before pushing."
32
+ exit 1
33
+ fi
34
+
35
+ - name: Set up Python ${{ matrix.python-version }}
36
+ uses: actions/setup-python@v5
37
+ with:
38
+ python-version: ${{ matrix.python-version }}
39
+ cache: 'pip'
40
+ cache-dependency-path: 'pyproject.toml'
41
+
42
+ - name: Limit BLAS threads
43
+ run: |
44
+ echo "OPENBLAS_NUM_THREADS=1" >> $GITHUB_ENV
45
+ echo "OMP_NUM_THREADS=1" >> $GITHUB_ENV
46
+ echo "MKL_NUM_THREADS=1" >> $GITHUB_ENV
47
+
48
+ - name: Install system dependencies
49
+ run: |
50
+ sudo apt-get update
51
+ sudo apt-get install -y build-essential python3-dev gfortran libopenblas-dev
52
+
53
+ - name: Install Python dependencies
54
+ run: |
55
+ python -m pip install --upgrade pip setuptools wheel
56
+ # ✅ Install build deps first (helps GPy compile)
57
+ pip install numpy cython
58
+ # ✅ Try to install GPy (use binary if available, else compile)
59
+ pip install GPy || pip install --no-binary :gpy: GPy
60
+ # ✅ Now install your package normally (no --no-build-isolation)
61
+ pip install -e ".[dev]"
62
+
63
+ - name: Run test suite
64
+ run: |
65
+ pytest tests/ \
66
+ --cov=gpclarity \
67
+ --cov-report=xml \
68
+ -v
69
+
70
+ - name: Upload coverage
71
+ uses: codecov/codecov-action@v4
72
+ with:
73
+ files: ./coverage.xml
74
+ fail_ci_if_error: false
75
+
76
+ - name: Type checking
77
+ continue-on-error: true
78
+ run: mypy gpclarity/ --ignore-missing-imports
79
+
80
+ - name: Format checking
81
+ run: |
82
+ black --check gpclarity/ tests/
83
+ # isort --check-only gpclarity/ tests/
84
+
85
+ build:
86
+ name: Build Package
87
+ runs-on: ubuntu-latest
88
+ needs: test
89
+ steps:
90
+ - uses: actions/checkout@v4
91
+ - uses: actions/setup-python@v5
92
+ with:
93
+ python-version: "3.10"
94
+
95
+ - name: Build package
96
+ run: |
97
+ pip install build twine
98
+ python -m build
99
+
100
+ - name: Upload artifacts
101
+ uses: actions/upload-artifact@v4
102
+ with:
103
+ name: dist-files
104
+ path: dist/
105
+
106
+ install-test:
107
+ name: Test Installation
108
+ runs-on: ubuntu-latest
109
+ needs: build
110
+ strategy:
111
+ matrix:
112
+ install-method: [wheel, source]
113
+ python-version: ["3.9", "3.12"]
114
+
115
+ steps:
116
+ - uses: actions/setup-python@v5
117
+ with:
118
+ python-version: ${{ matrix.python-version }}
119
+
120
+ - uses: actions/download-artifact@v4
121
+ with:
122
+ name: dist-files
123
+ path: dist/
124
+
125
+ - name: Install
126
+ run: |
127
+ if [ "${{ matrix.install-method }}" == "wheel" ]; then
128
+ pip install dist/*.whl
129
+ else
130
+ pip install dist/*.tar.gz
131
+ fi
132
+
133
+ - name: Verify
134
+ run: |
135
+ python -c "import gpclarity; print(gpclarity.__version__)"
@@ -0,0 +1,27 @@
1
+ name: Format & Lint Check
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ black_isort_check:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: 3.12
18
+ - name: Install dependencies
19
+ run: |
20
+ python -m pip install --upgrade pip
21
+ pip install black isort
22
+ - name: Show Black diff
23
+ run: black --diff gpdiagnostics/ tests/
24
+ - name: Show isort diff
25
+ run: isort --diff gpdiagnostics/ tests/
26
+ - name: Run Black check
27
+ run: black --check gpdiagnostics/ tests/
@@ -0,0 +1,52 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+
11
+ environment:
12
+ name: pypi
13
+ url: https://pypi.org/project/gpclarity
14
+
15
+ permissions:
16
+ contents: read # Needed to checkout repo
17
+ id-token: write # For trusted publishing
18
+
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v4 # v4 is latest stable
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.10"
27
+
28
+ - name: Install build dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip setuptools wheel
31
+ pip install build twine
32
+
33
+ - name: Build source and wheel distributions
34
+ run: |
35
+ python -m build
36
+
37
+ - name: Validate package
38
+ run: |
39
+ twine check dist/*
40
+
41
+ - name: Publish package to PyPI
42
+ uses: pypa/gh-action-pypi-publish@v1.8.7
43
+ with:
44
+ verbose: true
45
+ user: __token__ # Must set in GitHub Secrets
46
+ password: ${{ secrets.PYPI_API_TOKEN }}
47
+
48
+ - name: Upload release artifacts
49
+ uses: actions/upload-artifact@v4
50
+ with:
51
+ name: dist-files
52
+ path: dist/
@@ -0,0 +1,62 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ *.egg-info/
20
+ .installed.cfg
21
+ *.egg
22
+ MANIFEST
23
+
24
+ # Testing
25
+ .tox/
26
+ .pytest_cache/
27
+ .coverage
28
+ .htmlcov/
29
+ nosetests.xml
30
+ coverage.xml
31
+
32
+ # IDE
33
+ .vscode/
34
+ .idea/
35
+ *.swp
36
+ *.swo
37
+ *~
38
+
39
+ # OS
40
+ .DS_Store
41
+ Thumbs.db
42
+
43
+ # Documentation
44
+ docs/_build/
45
+ _site/
46
+
47
+ # Environment
48
+ .env
49
+ .venv
50
+ env/
51
+ venv/
52
+ ENV/
53
+ env.bak/
54
+ venv.bak/
55
+
56
+ # Jupyter
57
+ .ipynb_checkpoints
58
+
59
+ # MyPy
60
+ .mypy_cache/
61
+ .dmypy.json
62
+ dmypy.json
@@ -0,0 +1,34 @@
1
+ repos:
2
+ - repo: https://github.com/psf/black
3
+ rev: 23.3.0
4
+ hooks:
5
+ - id: black
6
+ language_version: python3
7
+
8
+ - repo: https://github.com/pre-commit/mirrors-mypy
9
+ rev: v1.3.0
10
+ hooks:
11
+ - id: mypy
12
+ additional_dependencies: [types-all]
13
+ exclude: ^(examples/|tests/)
14
+
15
+ - repo: https://github.com/pycqa/isort
16
+ rev: 5.12.0
17
+ hooks:
18
+ - id: isort
19
+ args: ["--profile", "black"]
20
+
21
+ - repo: https://github.com/pycqa/flake8
22
+ rev: 6.0.0
23
+ hooks:
24
+ - id: flake8
25
+ args: ["--max-line-length=88", "--extend-ignore=E203"]
26
+
27
+ - repo: https://github.com/pre-commit/pre-commit-hooks
28
+ rev: v4.4.0
29
+ hooks:
30
+ - id: check-yaml
31
+ - id: end-of-file-fixer
32
+ - id: trailing-whitespace
33
+ - id: check-added-large-files
34
+ args: ['--maxkb=1000']
@@ -0,0 +1,31 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Set the OS, Python version, and other tools you might need
8
+ build:
9
+ os: ubuntu-24.04
10
+ tools:
11
+ python: "3.13"
12
+ jobs:
13
+ #Verify index.rst exists in the build environment
14
+ post_checkout:
15
+ - echo "=== FORCING RTD TO USE LATEST MAIN ==="
16
+ - git fetch origin main
17
+ - git checkout main
18
+ - git reset --hard origin/main
19
+ - echo "=== Files in docs/ after reset ==="
20
+ - ls -la docs/
21
+ - echo "=== Verifying index.rst ==="
22
+ - test -f docs/index.rst
23
+
24
+ # Build documentation in the "docs/" directory with Sphinx
25
+ sphinx:
26
+ configuration: docs/conf.py
27
+
28
+ # Python requirements
29
+ python:
30
+ install:
31
+ - requirements: docs/requirements.txt
@@ -0,0 +1,26 @@
1
+ cff-version: 1.2.0
2
+ title: "gpclarity: Gaussian Process Interpretability Toolkit"
3
+ message: "If you use this software, please cite it as below."
4
+ type: software
5
+ authors:
6
+ - given-names: Angad
7
+ family-names: Kumar
8
+ repository-code: "https://github.com/AngadKumar16/gpclarity"
9
+ url: "https://github.com/AngadKumar16/gpclarity"
10
+ license: BSD-3-Clause
11
+ version: 0.1.0
12
+ date-released: 2026-01-26
13
+ keywords:
14
+ - gaussian-process
15
+ - machine-learning
16
+ - interpretability
17
+ - uncertainty
18
+ - bayesian-optimization
19
+ preferred-citation:
20
+ type: software
21
+ authors:
22
+ - given-names: Angad
23
+ family-names: Kumar
24
+ title: "gpclarity: Gaussian Process Interpretability Toolkit"
25
+ year: 2026
26
+ url: "https://github.com/AngadKumar16/gpclarity"
@@ -0,0 +1,37 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Angad Kumar
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+
32
+ Academic Citation Request (Non-Binding)
33
+
34
+ If you use GPClarity in academic research, publications, or derived
35
+ scientific work, we kindly request that you cite the software. Citation
36
+ helps support continued development and enables recognition of open
37
+ scientific infrastructure. See the CITATION.cff file for details.
@@ -0,0 +1,17 @@
1
+ include LICENSE
2
+ include README.md
3
+ include pyproject.toml
4
+ include CITATION.cff
5
+ include CONTRIBUTING.md
6
+
7
+ recursive-include gpclarity *.py
8
+ recursive-include tests *.py
9
+ recursive-include examples *.py
10
+
11
+ recursive-include docs *.md *.rst *.py
12
+ recursive-exclude docs _build
13
+
14
+ prune .github
15
+ prune .git
16
+ prune __pycache__
17
+ prune *.egg-info
@@ -0,0 +1,248 @@
1
+ Metadata-Version: 2.4
2
+ Name: gpclarity
3
+ Version: 0.0.2
4
+ Summary: Interpretability and Diagnostics Tools for Gaussian Processes
5
+ Project-URL: Homepage, https://github.com/AngadKumar16/gpclarity
6
+ Project-URL: Issues, https://github.com/AngadKumar16/gpclarity/issues
7
+ Project-URL: Documentation, https://gpclarity.readthedocs.io
8
+ Author-email: Angad Kumar <angadkumar16ak@gmail.com>
9
+ License: BSD 3-Clause License
10
+
11
+ Copyright (c) 2026, Angad Kumar
12
+ All rights reserved.
13
+
14
+ Redistribution and use in source and binary forms, with or without
15
+ modification, are permitted provided that the following conditions are met:
16
+
17
+ 1. Redistributions of source code must retain the above copyright notice, this
18
+ list of conditions and the following disclaimer.
19
+
20
+ 2. Redistributions in binary form must reproduce the above copyright notice,
21
+ this list of conditions and the following disclaimer in the documentation
22
+ and/or other materials provided with the distribution.
23
+
24
+ 3. Neither the name of the copyright holder nor the names of its
25
+ contributors may be used to endorse or promote products derived from
26
+ this software without specific prior written permission.
27
+
28
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
32
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
+
39
+
40
+ Academic Citation Request (Non-Binding)
41
+
42
+ If you use GPClarity in academic research, publications, or derived
43
+ scientific work, we kindly request that you cite the software. Citation
44
+ helps support continued development and enables recognition of open
45
+ scientific infrastructure. See the CITATION.cff file for details.
46
+ License-File: LICENSE
47
+ Keywords: gaussian-process,interpretability,machine-learning,uncertainty
48
+ Classifier: Development Status :: 4 - Beta
49
+ Classifier: Intended Audience :: Science/Research
50
+ Classifier: License :: OSI Approved :: MIT License
51
+ Classifier: Programming Language :: Python :: 3
52
+ Classifier: Programming Language :: Python :: 3.9
53
+ Classifier: Programming Language :: Python :: 3.10
54
+ Classifier: Programming Language :: Python :: 3.11
55
+ Classifier: Programming Language :: Python :: 3.12
56
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
57
+ Requires-Python: >=3.9
58
+ Requires-Dist: emukit>=0.4.0
59
+ Requires-Dist: gpy>=1.10.0
60
+ Requires-Dist: matplotlib>=3.4.0
61
+ Requires-Dist: numpy>=1.20.0
62
+ Requires-Dist: scipy>=1.7.0
63
+ Provides-Extra: dev
64
+ Requires-Dist: black>=23.0; extra == 'dev'
65
+ Requires-Dist: isort>=5.12; extra == 'dev'
66
+ Requires-Dist: mypy>=1.0; extra == 'dev'
67
+ Requires-Dist: pre-commit>=3.0; extra == 'dev'
68
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
69
+ Requires-Dist: pytest>=7.0; extra == 'dev'
70
+ Provides-Extra: docs
71
+ Requires-Dist: myst-parser>=1.0; extra == 'docs'
72
+ Requires-Dist: nbsphinx>=0.9; extra == 'docs'
73
+ Requires-Dist: sphinx-rtd-theme>=1.2; extra == 'docs'
74
+ Requires-Dist: sphinx>=5.0; extra == 'docs'
75
+ Description-Content-Type: text/markdown
76
+
77
+ # GPClarity: Gaussian Process Interpretability Toolkit
78
+ ![Python Version](https://img.shields.io/python/v/gpclarity)
79
+ ![License](https://img.shields.io/badge/license-MIT-blue.svg)
80
+ ![Build Status](https://github.com/AngadKumar16/gpclarity/workflows/CI/badge.svg)
81
+
82
+ **GPClarity** is a production-ready library that transforms black-box Gaussian Process models into interpretable, debuggable, and trustworthy tools. Built on GPy and emukit, it provides human-readable insights into kernel behavior, uncertainty patterns, and model complexity.
83
+
84
+ ---
85
+
86
+ ## 🎯 Features
87
+
88
+ - 🔍 **Kernel Interpretation**: Translate raw kernel math into human meaning
89
+ - 📊 **Uncertainty Profiling**: Visualize and diagnose uncertainty behavior
90
+ - 📈 **Hyperparameter Tracking**: Monitor optimization dynamics in real-time
91
+ - 🧮 **Complexity Quantification**: Measure and prevent overfitting
92
+ - 🎯 **Data Influence Analysis**: Identify impactful training points
93
+ - 🔗 **Emukit Integration**: Seamless Bayesian optimization support
94
+
95
+ ---
96
+
97
+ ## 🚀 Quick Start
98
+
99
+ ```python
100
+ import gpclarity
101
+ import GPy
102
+ import numpy as np
103
+
104
+ # Train a Gaussian Process
105
+ X = np.linspace(0, 10, 50).reshape(-1, 1)
106
+ y = np.sin(X).flatten() + 0.1 * np.random.randn(50)
107
+
108
+ kernel = GPy.kern.RBF(1) + GPy.kern.White(1)
109
+ model = GPy.models.GPRegression(X, y[:, None], kernel)
110
+ model.optimize()
111
+
112
+ summary = gpclarity.summarize_kernel(model)
113
+
114
+ profiler = gpclarity.UncertaintyProfiler(model)
115
+ X_test = np.linspace(-2, 12, 200).reshape(-1, 1)
116
+ profiler.plot(X_test, X_train=X, y_train=y)
117
+
118
+ tracker = gpclarity.HyperparameterTracker(model)
119
+ history = tracker.wrapped_optimize(max_iters=50)
120
+ tracker.plot_evolution()
121
+
122
+ complexity = gpclarity.compute_complexity_score(model, X)
123
+ print(f"Complexity: {complexity['score']:.2f} - {complexity['interpretation']}")
124
+ ```
125
+
126
+ ---
127
+
128
+ ## 📦 Installation
129
+
130
+ ### Stable Release
131
+ ```bash
132
+ pip install gpclarity
133
+ ```
134
+
135
+ ### Development Version
136
+ ```bash
137
+ git clone https://github.com/AngadKumar16/gpclarity.git
138
+ cd gpclarity
139
+ pip install -e ".[dev]"
140
+ ```
141
+
142
+ ### Conda (coming soon)
143
+ ```bash
144
+ conda install -c conda-forge gpclarity
145
+ ```
146
+
147
+ ---
148
+
149
+ ## 🏗️ Architecture
150
+
151
+ ```
152
+ gpclarity/
153
+ ├── kernel_summary
154
+ ├── uncertainty_analysis
155
+ ├── hyperparam_tracker
156
+ ├── model_complexity
157
+ ├── data_influence
158
+ └── utils
159
+ ```
160
+
161
+ ---
162
+
163
+ ## 🔬 Advanced Usage
164
+
165
+ ### Emukit Integration
166
+
167
+ ```python
168
+ from gpclarity import ClarityBayesianOptimizationLoop
169
+
170
+ loop = ClarityBayesianOptimizationLoop(model, space)
171
+ loop.run_loop(user_function, stopping_condition)
172
+ loop.plot_diagnostics()
173
+ ```
174
+
175
+ ### Batch Processing
176
+
177
+ ```python
178
+ models = [model1, model2, model3]
179
+ reports = [gpclarity.summarize_kernel(m, verbose=False) for m in models]
180
+ ```
181
+
182
+ ---
183
+
184
+ ## 📊 Example Outputs
185
+
186
+ ### Kernel Summary
187
+
188
+ ```
189
+ 🔍 KERNEL SUMMARY
190
+ Structure: ['RBF', 'White']
191
+ Components: 2
192
+
193
+ 📦 RBF (lengthscale)
194
+ └─ lengthscale: 1.23
195
+ 💡 Moderate flexibility
196
+
197
+ 📦 White (variance)
198
+ └─ variance: 0.01
199
+ 💡 Low observation noise
200
+ ```
201
+
202
+ ### Complexity Report
203
+
204
+ ```json
205
+ {
206
+ "score": 2.34,
207
+ "interpretation": "Moderate complexity (well-balanced)",
208
+ "components": {
209
+ "n_kernel_parts": 2,
210
+ "roughness_score": 0.81,
211
+ "noise_ratio": 4.5
212
+ }
213
+ }
214
+ ```
215
+
216
+ ---
217
+
218
+ ## 🎓 Citation
219
+
220
+ ```bibtex
221
+ @software{gpclarity2026,
222
+ title={gpclarity: Gaussian Process Interpretability Toolkit},
223
+ author={Angad Kumar},
224
+ year={2026},
225
+ url={https://github.com/AngadKumar16/gpclarity},
226
+ version={0.1.0}
227
+ }
228
+ ```
229
+ ## 📝 License
230
+
231
+ GPClarity is licensed under the **MIT License**. See [LICENSE](LICENSE) for details.
232
+
233
+ ## 🤝 Contributing
234
+
235
+ Contributions are welcome!
236
+
237
+ - Report bugs or request features via [GitHub Issues](https://github.com/AngadKumar16/gpclarity/issues)
238
+ - Submit pull requests for fixes or enhancements
239
+ - Make sure to follow the code style and write tests for new features
240
+
241
+ **Author:** Angad Kumar ([GitHub](https://github.com/AngadKumar16), [Email](mailto:angadkumar16ak@gmail.com))
242
+
243
+ ## 🛣️ Roadmap
244
+
245
+ - Conda package support
246
+ - More visualization tools for kernel decomposition
247
+ - Automated tutorials / example notebooks
248
+ - More features overall