Skip to main content

Synthetic noise-driven time series with controllable structure for ML benchmarks.

Project description

chronoise

Synthetic noise-driven time series with controllable structure for ML benchmarks.

Each series is generated as

X_t = L_t + a * N(t)

where L_t is a piecewise-constant level with stochastic step lengths and an optional seasonal sign bias, and N(t) is one of six configurable noise styles (five 1/f^beta colored noises and one El-Nino-style noise). The canonical dataset is a 6 x 3 x 2 x 10 = 360-element grid.

Install

pip install chronoise

Requires Python >=3.10, numpy>=1.23, torch>=2.0.

Usage

from chronoise import (
    GeneratorConfig, NoiseKind, NoiseSpec,
    generate_series, NoiseSeriesDataset,
)

cfg = GeneratorConfig()

# Single realization.
r = generate_series(
    cfg,
    noise=NoiseSpec(NoiseKind.BETA, beta=1.0),
    amplitude=1.0,
    structural_mode=1,
    seed=0,
)
# r.X: (T,) float64 observed series
# r.y: (T,) int8 direction labels in {-1, 0, +1}
# r.L, r.N: level and standardized noise components

# Full canonical dataset (360 series in memory).
ds = NoiseSeriesDataset(cfg)
ds.save("dataset.npz")
ds = NoiseSeriesDataset.load("dataset.npz")

x, y = ds[0]  # torch tensors

For a runnable example see examples/quickstart.py.

CLI

chronoise-build dataset.npz --T 8192 --n-seeds 10

Add --keep-components to also store the level (L) and noise (N) components in the archive.

Configuration

All knobs live on GeneratorConfig (chronoise/config.py): series length, level statistics (sigma_L, gamma, T0, segment-length geometric parameters), colored-noise frequency grid (K, f_low, f_high), El-Nino-style noise (T1, T2, phi_ar), and the canonical product axes (betas, amplitudes, structural_modes, n_seeds).

Series with the same seed share the same level trace across noise types, which is convenient for paired comparisons.

Example

example1.jpg

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

chronoise-0.1.1.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

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

chronoise-0.1.1-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file chronoise-0.1.1.tar.gz.

File metadata

  • Download URL: chronoise-0.1.1.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for chronoise-0.1.1.tar.gz
Algorithm Hash digest
SHA256 67134d6dbec7dda4b4a16d8bfe18d23d122419d1305d1a8264587deb5d5f79ee
MD5 757d6da4d8a997f61003b7e1312d56cd
BLAKE2b-256 39e09423caa4481e74a3e4fc47ef79d630b5c63aef6cef30c3b2f92d9e4738cf

See more details on using hashes here.

File details

Details for the file chronoise-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: chronoise-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for chronoise-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d1ab86dd3c93910419308806e274c77d3d643e7551c26e6f5d65f3b3a719eb6
MD5 01f907bd526160f2f3c3b373b94d1477
BLAKE2b-256 0cbc663f38690614e0ea14b54a6c31d15d9abe89a99b033bde4183cb79a55265

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