uncertainty-tools 0.0.1__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.
@@ -0,0 +1,6 @@
1
+ venv/
2
+ .venv/
3
+ unc_tools.egg-info/
4
+ .pytest_cache/
5
+ build/
6
+ .ipynb_checkpoints/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Savateykin Yaroslav
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,101 @@
1
+ Metadata-Version: 2.4
2
+ Name: uncertainty_tools
3
+ Version: 0.0.1
4
+ Summary: Utilities for uncertainty-aware regression and symbolic function helpers.
5
+ Author-email: Savateykin Yaroslav <yaroslavsavateikinwork@yandex.ru>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Savateykin Yaroslav
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ License-File: LICENSE
28
+ Classifier: Intended Audience :: Science/Research
29
+ Classifier: License :: OSI Approved :: MIT License
30
+ Classifier: Programming Language :: Python :: 3
31
+ Classifier: Programming Language :: Python :: 3.10
32
+ Classifier: Programming Language :: Python :: 3.11
33
+ Classifier: Programming Language :: Python :: 3.12
34
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
35
+ Classifier: Typing :: Typed
36
+ Requires-Python: >=3.10
37
+ Requires-Dist: matplotlib>=3.7
38
+ Requires-Dist: numpy>=1.23
39
+ Requires-Dist: pandas>=1.5
40
+ Requires-Dist: scipy>=1.10
41
+ Requires-Dist: sympy>=1.11
42
+ Requires-Dist: uncertainties>=3.1
43
+ Provides-Extra: test
44
+ Requires-Dist: pytest>=7.0; extra == 'test'
45
+ Description-Content-Type: text/markdown
46
+
47
+ # unc_tools
48
+
49
+ Utilities for uncertainty-aware regression and symbolic function helpers.
50
+
51
+ Python version: 3.10+
52
+
53
+ ## Install (uv)
54
+
55
+ ```bash
56
+ uv venv
57
+ uv pip install -e .
58
+ ```
59
+
60
+ ## Install (pip)
61
+
62
+ ```bash
63
+ pip install unc_tools
64
+ ```
65
+
66
+ ## Usage
67
+
68
+ ```python
69
+ from unc_tools import FunctionBase1D, Poly, UncRegression
70
+
71
+ # Symbolic expression with coefficients.
72
+ expr = FunctionBase1D("a*x + b")
73
+
74
+ # Polynomial helper.
75
+ poly = Poly(2)
76
+
77
+ # Regression with uncertainty propagation.
78
+ reg = UncRegression([0, 1, 2], [0, 1.1, 1.9], func=expr)
79
+ pred = reg.predict([0.5, 1.5])
80
+ ```
81
+
82
+ ## Optional matplotlib and sympy patches
83
+
84
+ Importing `unc_tools.patches` monkey-patches matplotlib `Axes.scatter`/`Axes.plot`
85
+ and adds uncertainty-aware helpers for sympy substitution/lambdify. This is a
86
+ global side effect and should be enabled explicitly:
87
+
88
+ ```python
89
+ import unc_tools.patches # noqa: F401
90
+ ```
91
+
92
+ ## Public API
93
+
94
+ - `UncRegression`: regression with uncertainty propagation.
95
+ - `FunctionBase1D`, `Poly`, `Hyper`: symbolic helpers for 1D expressions.
96
+ - `DataError`, `ExpressionError`, `InitialGuessError`, `ModelTypeError`: custom exceptions.
97
+
98
+
99
+ ## License
100
+
101
+ This project is licensed under the MIT License.
@@ -0,0 +1,55 @@
1
+ # unc_tools
2
+
3
+ Utilities for uncertainty-aware regression and symbolic function helpers.
4
+
5
+ Python version: 3.10+
6
+
7
+ ## Install (uv)
8
+
9
+ ```bash
10
+ uv venv
11
+ uv pip install -e .
12
+ ```
13
+
14
+ ## Install (pip)
15
+
16
+ ```bash
17
+ pip install unc_tools
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```python
23
+ from unc_tools import FunctionBase1D, Poly, UncRegression
24
+
25
+ # Symbolic expression with coefficients.
26
+ expr = FunctionBase1D("a*x + b")
27
+
28
+ # Polynomial helper.
29
+ poly = Poly(2)
30
+
31
+ # Regression with uncertainty propagation.
32
+ reg = UncRegression([0, 1, 2], [0, 1.1, 1.9], func=expr)
33
+ pred = reg.predict([0.5, 1.5])
34
+ ```
35
+
36
+ ## Optional matplotlib and sympy patches
37
+
38
+ Importing `unc_tools.patches` monkey-patches matplotlib `Axes.scatter`/`Axes.plot`
39
+ and adds uncertainty-aware helpers for sympy substitution/lambdify. This is a
40
+ global side effect and should be enabled explicitly:
41
+
42
+ ```python
43
+ import unc_tools.patches # noqa: F401
44
+ ```
45
+
46
+ ## Public API
47
+
48
+ - `UncRegression`: regression with uncertainty propagation.
49
+ - `FunctionBase1D`, `Poly`, `Hyper`: symbolic helpers for 1D expressions.
50
+ - `DataError`, `ExpressionError`, `InitialGuessError`, `ModelTypeError`: custom exceptions.
51
+
52
+
53
+ ## License
54
+
55
+ This project is licensed under the MIT License.
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "uncertainty_tools"
7
+ version = "0.0.1"
8
+ description = "Utilities for uncertainty-aware regression and symbolic function helpers."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ authors = [{ name = "Savateykin Yaroslav", email = "yaroslavsavateikinwork@yandex.ru" }]
12
+ license = { file = "LICENSE" }
13
+ classifiers = [
14
+ "Intended Audience :: Science/Research",
15
+ "License :: OSI Approved :: MIT License",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Topic :: Scientific/Engineering :: Mathematics",
21
+ "Typing :: Typed",
22
+ ]
23
+ dependencies = [
24
+ "matplotlib>=3.7",
25
+ "numpy>=1.23",
26
+ "pandas>=1.5",
27
+ "scipy>=1.10",
28
+ "sympy>=1.11",
29
+ "uncertainties>=3.1",
30
+ ]
31
+
32
+ [project.optional-dependencies]
33
+ test = ["pytest>=7.0"]
34
+
35
+ [tool.hatch.build.targets.wheel]
36
+ packages = ["unc_tools"]
37
+ include = ["unc_tools/py.typed", "LICENSE"]
38
+
39
+ [tool.hatch.build.targets.sdist]
40
+ include = ["LICENSE", "README.md", "pyproject.toml", "unc_tools/**"]
41
+ exclude = [
42
+ "build/**",
43
+ "notebooks/**",
44
+ "tests/**",
45
+ "uv.lock",
46
+ "venv/**",
47
+ "**/__pycache__/**",
48
+ ]
@@ -0,0 +1,26 @@
1
+ """Public package interface for uncertainty-aware tools."""
2
+
3
+ from __future__ import annotations
4
+ from importlib.metadata import PackageNotFoundError, version
5
+
6
+ from .default_functions import FunctionBase1D, Hyper, Poly
7
+ from .exceptions import DataError, ExpressionError, InitialGuessError, ModelTypeError
8
+ from .unc_regression import UncRegression
9
+
10
+
11
+ try:
12
+ __version__ = version("uncertainty_tools")
13
+ except PackageNotFoundError:
14
+ __version__ = "unknown"
15
+
16
+ __all__ = [
17
+ "DataError",
18
+ "ExpressionError",
19
+ "FunctionBase1D",
20
+ "Hyper",
21
+ "InitialGuessError",
22
+ "ModelTypeError",
23
+ "Poly",
24
+ "UncRegression",
25
+ "__version__",
26
+ ]