Metadata-Version: 2.4
Name: uncertainty_tools
Version: 0.0.1
Summary: Utilities for uncertainty-aware regression and symbolic function helpers.
Author-email: Savateykin Yaroslav <yaroslavsavateikinwork@yandex.ru>
License: MIT License
        
        Copyright (c) 2025 Savateykin Yaroslav
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: matplotlib>=3.7
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=1.5
Requires-Dist: scipy>=1.10
Requires-Dist: sympy>=1.11
Requires-Dist: uncertainties>=3.1
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == 'test'
Description-Content-Type: text/markdown

# unc_tools

Utilities for uncertainty-aware regression and symbolic function helpers.

Python version: 3.10+

## Install (uv)

```bash
uv venv
uv pip install -e .
```

## Install (pip)

```bash
pip install unc_tools
```

## Usage

```python
from unc_tools import FunctionBase1D, Poly, UncRegression

# Symbolic expression with coefficients.
expr = FunctionBase1D("a*x + b")

# Polynomial helper.
poly = Poly(2)

# Regression with uncertainty propagation.
reg = UncRegression([0, 1, 2], [0, 1.1, 1.9], func=expr)
pred = reg.predict([0.5, 1.5])
```

## Optional matplotlib and sympy patches

Importing `unc_tools.patches` monkey-patches matplotlib `Axes.scatter`/`Axes.plot`
and adds uncertainty-aware helpers for sympy substitution/lambdify. This is a
global side effect and should be enabled explicitly:

```python
import unc_tools.patches  # noqa: F401
```

## Public API

- `UncRegression`: regression with uncertainty propagation.
- `FunctionBase1D`, `Poly`, `Hyper`: symbolic helpers for 1D expressions.
- `DataError`, `ExpressionError`, `InitialGuessError`, `ModelTypeError`: custom exceptions.


## License

This project is licensed under the MIT License.
