Metadata-Version: 2.4
Name: gpclarity
Version: 0.0.3
Summary: Interpretability and Diagnostics Tools for Gaussian Processes
Project-URL: Homepage, https://github.com/AngadKumar16/gpclarity
Project-URL: Issues, https://github.com/AngadKumar16/gpclarity/issues
Project-URL: Documentation, https://gpclarity.readthedocs.io
Author-email: Angad Kumar <angadkumar16ak@gmail.com>
License: BSD 3-Clause License
        
        Copyright (c) 2026, Angad Kumar
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
        
        Academic Citation Request (Non-Binding)
        
        If you use GPClarity in academic research, publications, or derived
        scientific work, we kindly request that you cite the software. Citation
        helps support continued development and enables recognition of open
        scientific infrastructure. See the CITATION.cff file for details.
License-File: LICENSE
Keywords: gaussian-process,interpretability,machine-learning,uncertainty
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: emukit>=0.4.0
Requires-Dist: gpy>=1.10.0
Requires-Dist: matplotlib>=3.4.0
Requires-Dist: numpy>=1.20.0
Requires-Dist: scipy>=1.7.0
Provides-Extra: dev
Requires-Dist: black>=23.0; extra == 'dev'
Requires-Dist: isort>=5.12; extra == 'dev'
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: myst-parser>=1.0; extra == 'docs'
Requires-Dist: nbsphinx>=0.9; extra == 'docs'
Requires-Dist: sphinx-rtd-theme>=1.2; extra == 'docs'
Requires-Dist: sphinx>=5.0; extra == 'docs'
Description-Content-Type: text/markdown

# GPClarity: Gaussian Process Interpretability Toolkit
![Python Version](https://img.shields.io/python/v/gpclarity)
![License](https://img.shields.io/badge/license-MIT-blue.svg)
![Build Status](https://github.com/AngadKumar16/gpclarity/workflows/CI/badge.svg)

**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.

---

## 🎯 Features

- 🔍 **Kernel Interpretation**: Translate raw kernel math into human meaning
- 📊 **Uncertainty Profiling**: Visualize and diagnose uncertainty behavior
- 📈 **Hyperparameter Tracking**: Monitor optimization dynamics in real-time
- 🧮 **Complexity Quantification**: Measure and prevent overfitting
- 🎯 **Data Influence Analysis**: Identify impactful training points
- 🔗 **Emukit Integration**: Seamless Bayesian optimization support

---

## 🚀 Quick Start

```python
import gpclarity
import GPy
import numpy as np

# Train a Gaussian Process
X = np.linspace(0, 10, 50).reshape(-1, 1)
y = np.sin(X).flatten() + 0.1 * np.random.randn(50)

kernel = GPy.kern.RBF(1) + GPy.kern.White(1)
model = GPy.models.GPRegression(X, y[:, None], kernel)
model.optimize()

summary = gpclarity.summarize_kernel(model)

profiler = gpclarity.UncertaintyProfiler(model)
X_test = np.linspace(-2, 12, 200).reshape(-1, 1)
profiler.plot(X_test, X_train=X, y_train=y)

tracker = gpclarity.HyperparameterTracker(model)
history = tracker.wrapped_optimize(max_iters=50)
tracker.plot_evolution()

complexity = gpclarity.compute_complexity_score(model, X)
print(f"Complexity: {complexity['score']:.2f} - {complexity['interpretation']}")
```

---

## 📦 Installation

### Stable Release
```bash
pip install gpclarity
```

### Development Version
```bash
git clone https://github.com/AngadKumar16/gpclarity.git
cd gpclarity
pip install -e ".[dev]"
```

### Conda (coming soon)
```bash
conda install -c conda-forge gpclarity
```

---

## 🏗️ Architecture

```
gpclarity/
├── kernel_summary
├── uncertainty_analysis
├── hyperparam_tracker
├── model_complexity
├── data_influence
└── utils
```

---

## 🔬 Advanced Usage

### Emukit Integration

```python
from gpclarity import ClarityBayesianOptimizationLoop

loop = ClarityBayesianOptimizationLoop(model, space)
loop.run_loop(user_function, stopping_condition)
loop.plot_diagnostics()
```

### Batch Processing

```python
models = [model1, model2, model3]
reports = [gpclarity.summarize_kernel(m, verbose=False) for m in models]
```

---

## 📊 Example Outputs

### Kernel Summary

```
🔍 KERNEL SUMMARY
Structure: ['RBF', 'White']
Components: 2

📦 RBF (lengthscale)
  └─ lengthscale: 1.23
  💡 Moderate flexibility

📦 White (variance)
  └─ variance: 0.01
  💡 Low observation noise
```

### Complexity Report

```json
{
  "score": 2.34,
  "interpretation": "Moderate complexity (well-balanced)",
  "components": {
    "n_kernel_parts": 2,
    "roughness_score": 0.81,
    "noise_ratio": 4.5
  }
}
```

---

## 🎓 Citation

```bibtex
@software{gpclarity2026,
  title={gpclarity: Gaussian Process Interpretability Toolkit},
  author={Angad Kumar},
  year={2026},
  url={https://github.com/AngadKumar16/gpclarity},
  version={0.1.0}
}
```
## 📝 License

GPClarity is licensed under the **MIT License**. See [LICENSE](LICENSE) for details.

## 🤝 Contributing

Contributions are welcome!  

- Report bugs or request features via [GitHub Issues](https://github.com/AngadKumar16/gpclarity/issues)
- Submit pull requests for fixes or enhancements
- Make sure to follow the code style and write tests for new features

**Author:** Angad Kumar ([GitHub](https://github.com/AngadKumar16), [Email](mailto:angadkumar16ak@gmail.com))

## 🛣️ Roadmap

- Conda package support
- More visualization tools for kernel decomposition
- Automated tutorials / example notebooks
- More features overall
