Metadata-Version: 2.4
Name: chronoise
Version: 0.1.0
Summary: Synthetic noise-driven time series with controllable structure for ML benchmarks.
Author-email: "Sosedov A.T." <ac.official.it@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Shel2123
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/Shel2123/Chronoise
Project-URL: Repository, https://github.com/Shel2123/Chronoise
Project-URL: Issues, https://github.com/Shel2123/Chronoise/issues
Keywords: time-series,synthetic-data,benchmark,noise,pytorch,1/f-noise
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
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.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Provides-Extra: torch
Requires-Dist: torch>=2.0; extra == "torch"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: torch>=2.0; extra == "dev"
Dynamic: license-file

# 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

```bash
pip install .
```

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

## Usage

```python
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

```bash
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.

## License
This project is licensed under the [MIT License](LICENSE).
