@@ -204,6 +204,35 @@ Convert a Narwhals `DataFrame` or `LazyFrame` (wrapping pandas, Dask, DuckDB, Py
204204etc.) into the equivalent Polars object; lazy inputs are backed by a custom source so
205205filters bridge to the underlying engine.
206206
207+ ### ` scan_synthetic_regression `
208+
209+ ``` python
210+ scan_synthetic_regression(* , n_samples, n_features, n_responses = 1 , use_weights = False ,
211+ weights_low = 0.5 , weights_high = 1.5 , betas = None , epsilon_loc = 0.0 ,
212+ epsilon_scale = 1.0 , chunk_key = None , n_chunks = None , seed = None ,
213+ fetch_size = 10_000 ) -> pl.LazyFrame
214+ ```
215+
216+ Lazy source of synthetic linear-regression data ` Y = X @ B + E ` with Gaussian noise.
217+ Emits ` x0..x{n_features-1} ` and ` y0..y{n_responses-1} ` ; with ` use_weights=True ` a ` weight `
218+ column is added and noise is scaled so a WLS fit recovers ` betas ` . Row values are
219+ batch-independent for a fixed ` seed ` , and predicate/projection/` head ` pushdowns apply.
220+
221+ ### ` scan_synthetic_panel `
222+
223+ ``` python
224+ scan_synthetic_panel(* , start_date, end_date, freq = " 1D" , n_symbols = 1 , n_features,
225+ n_responses = 1 , betas = None , use_weights = False , weights_low = 0.5 ,
226+ weights_high = 1.5 , categories = None , group_by = None , epsilon_loc = 0.0 ,
227+ epsilon_scale = 1.0 , seed = None , fetch_size = 10_000 ) -> pl.LazyFrame
228+ ```
229+
230+ Lazy source of synthetic panel data on a ` (date, symbol) ` grid, one row per pair over the
231+ business days in ` [start_date, end_date] ` . Same regression model as
232+ ` scan_synthetic_regression ` , plus optional decorative ` categories ` and per-group
233+ coefficients via ` group_by=(name, values) ` . Rows are yielded date-by-date so
234+ ` .set_sorted("date").group_by("date") ` streams cleanly.
235+
207236## Writing sinks
208237
209238### ` sink_delta ` (function)
0 commit comments