Guides
Learn duckboost by working through a model, from the first training table to a scoring query you can share.
Start here
Fit your first penguin model.
How much does a penguin weigh? Load the Palmer penguins CSV into DuckDB, fit a regression model, and put each prediction beside the bird’s measured mass.
Start the walkthroughInside the example
- Target
- Body mass in grams
- Features
- Bill length, bill depth, flipper length and sex
- Fit check
- Root mean squared error on the training rows
Prepare and fit
Start with data you can inspect. Split the rows before learning any preprocessing values, then fit and inspect your trees.
- Practice with iris and penguinsRead public CSVs, predict a species, and compare classification with body-mass regression.
- Split rows and prepare featuresSet aside validation and test rows. Learn medians and category levels on training data, then save them with a named-column model.
- Work with the native trainerUse island as a categorical feature, hold out rows for early stopping, and inspect which features the trees split on.
- Train one model per groupFit a body-mass model per species. Score each held-out bird with its species model and compare the predictions with the species average.
Score and export
Once you have a fitted model, check what it predicts on unseen rows and take its scoring logic into another DuckDB session.
- Turn fitted trees into SQLMeasure error on a holdout, export the trees, and check that plain SQL reproduces the model’s predictions in a fresh session.
- Calibrate prediction intervalsFit three quantiles, use a separate fold to calibrate the interval, and score new rows with lower, median and upper estimates.
- Score a model trained elsewhereImport an XGBoost JSON dump, a LightGBM text model or a CatBoost JSON model and inspect its predictions in DuckDB.
Choose a workflow
Match the trainer to your data, check the cost of the fit, and see how duckboost works alongside another extension.
- Decide where to trainCompare training inside DuckDB with importing trees from a vendor library. Use the examples to decide where the model belongs in your pipeline.
- Read and reproduce the benchmarksCompare fit time, peak memory and holdout quality across thread counts. Inspect the size and execution cost of exported SQL.
- Route support tickets with embeddingsEmbed a ticket’s subject and body with quackformers, then train a classifier to distinguish billing requests from technical support.