Metadata-Version: 2.4
Name: ialdev-maths
Version: 0.2.1
Summary: iad.maths — histograms, geometry, regression
Author: ipcoder
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: ialdev-core
Requires-Dist: numpy>=1.20.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: numba>=0.55.0
Requires-Dist: scikit-learn>=1.0.0
Requires-Dist: pytest>=7.0.0 ; extra == "dev"
Requires-Dist: ialdev-vis ; extra == "dev"
Project-URL: Homepage, https://github.com/ipcoder/ialdev/tree/master/maths
Project-URL: Issues, https://github.com/ipcoder/ialdev/issues
Project-URL: Repository, https://github.com/ipcoder/ialdev
Provides-Extra: dev

# ialdev-maths

Numerical helpers for the `iad` toolbox, published as `ialdev-maths` and imported as `iad.maths`.

Use this package for histogram statistics, sampling, geometry primitives, plane fitting, and regression helpers used by image/data workflows.

## Install

```bash
pip install ialdev-maths
```

Requires Python `>=3.10`.

## Highlights

- Histogram tools: `Sampler`, `StatGather`, `StatGather2D`, `Hist2D`, and equal-bin statistics.
- Geometry primitives: `Vec2d`, `Rect`, `Pose`, ranges, and region checks.
- Plane utilities: plane fitting, axis IDs, and 3D plane representation.
- Regression helpers, including robust linear regression and an SVD plane estimator.

## Examples

```python
from iad.maths.geom.shapes import Rect, Vec2d

roi = Rect(Vec2d(10, 20), dim=Vec2d(100, 80))
inside = (25, 30) in roi
```

```python
from iad.maths.hist import Sampler, equal_bins_stats

sampler = Sampler(low=0, high=1, bins=16)
stats = equal_bins_stats(values, sampler, stats=True)
```

```python
from iad.maths.regress import robust_linear_regression

coef, intercept = robust_linear_regression(x, y)
```

