Skip to main content

Utilities for uncertainty-aware regression and symbolic function helpers.

Project description

unc_tools

Utilities for uncertainty-aware regression and symbolic function helpers.

Python version: 3.10+

Install (uv)

uv venv
uv pip install -e .

Install (pip)

pip install unc_tools

Usage

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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uncertainty_tools-0.0.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uncertainty_tools-0.0.1-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file uncertainty_tools-0.0.1.tar.gz.

File metadata

  • Download URL: uncertainty_tools-0.0.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for uncertainty_tools-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5c460cc606e244eb3c6bcba6b76a5e5ccdb65c44503e583a449c5488b1d66b6b
MD5 c8c680c350341f1e85c71601cfd9db31
BLAKE2b-256 286dd693a39b3c5a9b46307c1f198cf74253c4f64c20a75af51f4e9dcc7928f1

See more details on using hashes here.

File details

Details for the file uncertainty_tools-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for uncertainty_tools-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8457e40c7ce06233e86aad7f3523c7875c319c49e7bf10bf18f74349ea15f82f
MD5 891fab7206aa7e91d1c2599d4e100efe
BLAKE2b-256 b446121fa6c089924170007a04ccf8af487eb6041184483aaf051f4d96ca6f12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page