Metadata-Version: 2.1
Name: rnd-pcw-poly
Version: 0.1.0
Summary: Generate random piecewise polynomials
Home-page: https://github.com/SV-97/rnd-pcw-poly
Author: Stefan Volz
Author-email: volzstefan97@googlemail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Dist: matplotlib (>=3.7.1,<4.0.0)
Requires-Dist: numpy (>=1.24.2,<2.0.0)
Requires-Dist: random-partition-py (>=0.1.0,<0.2.0)
Project-URL: Repository, https://github.com/SV-97/rnd-pcw-poly
Description-Content-Type: text/markdown

# rnd-pcw-poly

Generates random piecewise polynomial functions (for example for testing CPD-algorithms).

## Example

```python
import numpy as np
import matplotlib.pyplot as plt
from rnc_pcw_poly import rnd_pcw_poly

# generate a piecewise polynomial function with 5 "jumps" / 6 segments;
# no more than 200 degrees of freedom in total and locally no more than
# 6 degrees of freedom. 
p = rnd_pcw_poly(5, 200, 6)

# plot it
xs = np.linspace(0,1,5000)
ys = p(xs)
plt.scatter(xs, ys)
plt.show()
```

The algorithm has seperately seedable and idependent core characteristics like jump locations, dof distribution, realization etc.
