--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: duckboost excerpt: | DuckDB Community Extensions SQL-native histogram GBDT in DuckDB with vendor dump import and plain-SQL export # Source of truth for https://github.com/duckdb/community-extensions # extensions/duckboost/description.yml # Also ship docs/community_extensions_function_descriptions.csv as # extensions/duckboost/docs/function_descriptions.csv # so the community “Added Functions” table is populated. # # DuckDB community CI builds `repo.ref` against DuckDB 2.0.0 LTS # (duckdb_version=v2.0.0, duckdb_commit=d54cbbe…). duckboost is 2.0-only: # do not set `variegata` or `ref_next`. extension: name: duckboost description: SQL-native histogram GBDT in DuckDB with vendor dump import and plain-SQL export version: 0.0.5 language: C++ build: cmake license: MIT maintainers: - JavOrraca # Default community builds are dependency-free CMake (native trainer + dump import). # No extra toolchain: optional XGBoost/LightGBM trainers are custom-build flags only. repo: github: JavOrraca/duckboost # v0.0.5 release commit (tag v0.0.5). Raw SHA only — not a movable tag. ref: 0c9dc402641c7c6a25faee93e8aeb5bb70123a27 docs: # Mirrors the Getting Started penguins first-model loop. Uses a public raw URL so the # community catalog runner does not need a repo checkout (requires httpfs autoload). hello_world: | LOAD duckboost; CREATE TABLE penguins AS SELECT body_mass_g::DOUBLE AS body_mass_g, [bill_length_mm, bill_depth_mm, flipper_length_mm, (sex = 'male')::DOUBLE] AS features FROM read_csv( 'https://raw.githubusercontent.com/allisonhorst/palmerpenguins/master/inst/extdata/penguins.csv', nullstr = 'NA' ) WHERE body_mass_g IS NOT NULL AND bill_length_mm IS NOT NULL AND sex IS NOT NULL; CREATE TABLE models AS SELECT duckboost_train( body_mass_g, features, MAP { 'backend': 'native', 'n_estimators': '40', 'max_depth': '3', 'learning_rate': '0.15', 'feature_names': 'bill_length_mm,bill_depth_mm,flipper_length_mm,male' } ) AS model FROM penguins; SELECT round(body_mass_g, 0) AS body_mass_g, round(duckboost_predict(model, features), 0) AS pred_g FROM models, penguins ORDER BY body_mass_g LIMIT 5; extended_description: | `duckboost` trains a dependency-free histogram GBDT inside DuckDB (`backend = 'native'`, alias `'reference'`), evaluates and inspects models in SQL, imports XGBoost / LightGBM / CatBoost dumps, and exports orbital-style SQL (`duckboost_to_sql`) for inference without the extension. The [Getting Started](https://javorraca.github.io/duckboost/getting-started.html) page walks through the same Palmer penguins first model using the package CSV over HTTPS. Default community binaries ship the native trainer plus dump import. Optional in-process XGBoost / LightGBM training requires rebuilding with `DUCKBOOST_WITH_XGBOOST` / `DUCKBOOST_WITH_LIGHTGBM`. CatBoost is import-only. extension_star_count: 3 extension_star_count_pretty: 3 extension_download_count: 522 extension_download_count_pretty: 522 image: '/images/community_extensions/social_preview/preview_community_extension_duckboost.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Linux ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | macOS AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | macOS ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Windows AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ✅ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions
| function_name | function_type | description | comment | examples | |------------------------------------|---------------|------------------------------------------------------------------------------------------|---------|---------------------------------------------------------------------------------------------------| | duckboost_backends | table | List available GBDT backends and whether this binary can train them in-process | NULL | [SELECT * FROM duckboost_backends();] | | duckboost_build_info | table | Report compile-time duckboost build flags and linked trainers | NULL | [SELECT * FROM duckboost_build_info();] | | duckboost_dummy | macro | One-hot or reference-level dummy encode a categorical value against known levels | NULL | [duckboost_dummy(sex, ['female','male'])] | | duckboost_dummy_names | macro | Column names matching duckboost_dummy output for the given levels | NULL | [duckboost_dummy_names('sex', ['female','male'])] | | duckboost_evaluate | scalar | Per-row evaluation score for a model prediction vs label | NULL | [duckboost_evaluate(model, y, features)] | | duckboost_evaluate_agg | aggregate | Aggregate evaluation metric (rmse, auc, brier_score, ...) over labeled rows | NULL | [duckboost_evaluate_agg(model, y, features, MAP {'metric': 'rmse'})] | | duckboost_fit | table_macro | Train a model from a table name (table macro wrapper around duckboost_train) | NULL | [FROM duckboost_fit('penguins', 'body_mass_g', 'features', options := MAP {'backend': 'native'})] | | duckboost_import | scalar | Import an XGBoost, LightGBM, or CatBoost model dump into duckboost JSON | NULL | [duckboost_import('xgboost', dump_json)] | | duckboost_importance | table | Feature importance table (gain, cover, frequency) for a trained model | NULL | [SELECT * FROM duckboost_importance(model);] | | duckboost_initial_split | table_macro | Add a train/test split column by content-hash (optional strata) | NULL | [FROM duckboost_initial_split('penguins', prop := 0.75)] | | duckboost_initial_validation_split | table_macro | Add train/validation/test split columns by content-hash (optional strata) | NULL | [FROM duckboost_initial_validation_split('penguins', prop := [0.6, 0.2])] | | duckboost_integer | macro | Map a categorical value to its 1-based position in levels (0 if absent) | NULL | [duckboost_integer(species, ['Adelie','Chinstrap','Gentoo'])] | | duckboost_levels | macro | Collect distinct categorical levels that appear at least min_count times | NULL | [duckboost_levels(sex, min_count := 1)] | | duckboost_other | macro | Collapse categorical values outside levels into a single other label | NULL | [duckboost_other(island, ['Biscoe','Dream'], other := 'other')] | | duckboost_predict | scalar | Score one feature vector with a duckboost model | NULL | [duckboost_predict(model, features)] | | duckboost_predict_proba | scalar | Class probabilities (or single-element list for regression) | NULL | [duckboost_predict_proba(model, features)] | | duckboost_score | table_macro | Score every row of a table and append a prediction column | NULL | [FROM duckboost_score(model, 'penguins', 'features')] | | duckboost_to_sql | scalar | Export a model as plain DuckDB SQL (DOUBLE literals) for inference without the extension | NULL | [duckboost_to_sql(model, 'penguins', ['bill_length_mm','bill_depth_mm'])] | | duckboost_train | aggregate | Train a histogram GBDT (native) or linked vendor trainer; returns model JSON | NULL | [duckboost_train(y, features, MAP {'backend': 'native', 'n_estimators': '40'})] | | duckboost_vfold | table_macro | Assign cross-validation fold ids by content-hash (optional strata) | NULL | [FROM duckboost_vfold('penguins', v := 5)] | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
| name | description | input_type | scope | aliases | typed_value | |----------------|---------------------------------------------------------|------------|--------|---------|-------------| | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |