1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
//! Canonical synthetic stream generators for benchmarking streaming ML algorithms.
//!
//! This module provides reusable, deterministic data stream generators implementing
//! well-known benchmark problems from the streaming ML literature. Each generator
//! produces samples one at a time via the [`StreamGenerator`] trait, making them
//! ideal for prequential (test-then-train) evaluation.
//!
//! # Generators
//!
//! | Generator | Task | Drift | Reference |
//! |-----------|------|-------|-----------|
//! | [`SEA`] | Binary classification | Abrupt | Street & Kim, KDD 2001 |
//! | [`Agrawal`] | Binary classification | Abrupt | Agrawal et al., 1993 |
//! | [`Hyperplane`] | Binary classification | Gradual | Hulten et al., KDD 2001 |
//! | [`LED`] | 10-class classification | Abrupt | Breiman et al., 1984 |
//! | [`Waveform`] | 3-class classification | None | Breiman et al., 1984 |
//! | [`RandomRBF`] | Multiclass classification | Gradual | Bifet et al., MOA 2010 |
//! | [`Friedman`] | Regression | Gradual | Friedman, 1991 |
//! | [`MackeyGlass`] | Regression | None | Mackey & Glass, 1977 |
//! | [`Lorenz`] | Regression | None | Lorenz, 1963 |
//! | [`MqarStream`] | Regression | Phase boundary | Arora et al., 2024 |
//! | [`NeedleStream`] | Regression | Epoch boundary | — |
//! | [`PeriodicStream`] | Regression | None | — |
//! | [`ParityStream`] | Binary classification | None | Abbe et al., 2023 |
//!
//! # Example
//!
//! ```
//! use irithyll::generators::{StreamGenerator, Hyperplane, TaskType};
//!
//! let mut gen = Hyperplane::new(42, 10, 3, 0.01, 0.05);
//! for _ in 0..1000 {
//! let (features, target) = gen.next_sample();
//! assert_eq!(features.len(), 10);
//! assert!(target == 0.0 || target == 1.0);
//! }
//! ```
pub use Agrawal;
pub use Friedman;
pub use Hyperplane;
pub use LED;
pub use Lorenz;
pub use MackeyGlass;
pub use MqarStream;
pub use NeedleStream;
pub use ParityStream;
pub use PeriodicStream;
pub use RandomRBF;
pub use SEA;
pub use Waveform;
// ---------------------------------------------------------------------------
// TaskType enum
// ---------------------------------------------------------------------------
/// Describes the learning task for a stream generator.
// ---------------------------------------------------------------------------
// StreamGenerator trait
// ---------------------------------------------------------------------------
/// A synthetic data stream that produces samples one at a time.
///
/// All generators are deterministic given a seed, produce finite `f64` values,
/// and track concept drift events.
// ---------------------------------------------------------------------------
// Xorshift64 PRNG (no external dependencies)
// ---------------------------------------------------------------------------
/// Minimal xorshift64 PRNG for deterministic stream generation.
///
/// Identical to the one used in `benches/real_world_bench.rs`.
pub ;