Generate random piecewise polynomials
Project description
rnd-pcw-poly
Generates random piecewise polynomial functions (for example for testing CPD-algorithms).
Example
import numpy as np
import matplotlib.pyplot as plt
from rnd_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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rnd_pcw_poly-0.2.0.tar.gz
(4.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rnd_pcw_poly-0.2.0.tar.gz.
File metadata
- Download URL: rnd_pcw_poly-0.2.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.10.9 Linux/6.4.6-76060406-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1c895830c60a63ca87a946c34a2340bdfe45534f1d9557d0dad6b9d5b1eb645
|
|
| MD5 |
a0849ed3e6775fae8f271b51bfc760c8
|
|
| BLAKE2b-256 |
5584b49a9952b4144ed79eedb8d48332a72b91309ff6fa500c7c981c23ff5ea9
|
File details
Details for the file rnd_pcw_poly-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rnd_pcw_poly-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.10.9 Linux/6.4.6-76060406-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcf810c39ec299d06205e4bfb714b23bdee7305f5bfacae649604e52ba03145e
|
|
| MD5 |
0239dd50a4baf815c716ad95bd73a176
|
|
| BLAKE2b-256 |
18261276acbbdc92359cbc74f86686596ef10903e49e5d0cbd797ed0a26fa6e0
|