DuckDB · SQL-first ML
FEATURE CONTRACT + VECTORIZED SCORINGDuckDB creates typed features and scores supplied coefficients; it does not claim general-purpose model training here.
EXECUTED SQL
Select an experiment.
LIVE SQL LAB · DUCKDB × CLICKHOUSE
DuckDB owns a reproducible feature-and-scoring pipeline. ClickHouse goes further: logistic training becomes aggregation, and aggregate state becomes the model.
RUN THE CONTRAST
Both engines use the same deterministic sales relation. Target: high_value = revenue ≥ 700. Features: quantity, scaled unit price and discount. This is instruction, not a business model.
DuckDB creates typed features and scores supplied coefficients; it does not claim general-purpose model training here.
Select an experiment.
ClickHouse trains logistic regression as an aggregate function and applies its compact state through SQL.
Select an experiment.
LAB SEQUENCE
The lab is complete only when students can explain every boundary—not merely produce a probability.
Identify target, types, units and scaling.
Confirm typed, reproducible output.
Find where supplied coefficients enter SQL.
Observe many rows becoming one weight array.
Trace state creation into evalMLMethod.
State who owns features, training, state and inference.
CONTINUE
MADlib remains the deeper classical in-database ML lab. This adds embedded SQL and columnar aggregate-state contrasts.