--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: rocket excerpt: | DuckDB Community Extensions ROCKET random convolutional kernel features for time-series classification extension: name: rocket description: ROCKET random convolutional kernel features for time-series classification version: 0.1.0 language: C++ build: cmake license: MIT maintainers: - maxdemarzi repo: github: maxdemarzi/duckdb-rocket ref: c33d6b1a109e0ba9abf1722ad3fa424b79d31d86 docs: hello_world: | -- 250 kernels produce 500 features: element 2i is kernel i's global max, -- 2i+1 its proportion of positive values. SELECT rocket_transform(values, 250, 0, 0) AS features FROM series; -- Kernel i is a pure function of (seed, i), so a group of kernels is addressable -- without generating the groups before it. These are the same kernels: SELECT rocket_transform(s, 4, 7, 4) = rocket_transform(s, 8, 7, 0)[9:16]; -- true -- Multivariate: outer list channels, inner list timepoints. Still 2 features -- per kernel -- the selected channels are summed inside one convolution. SELECT rocket_transform(channels, 250, 0, 0) FROM multivariate_series; -- Variable-length: pass an explicit reference length so every row shares one -- kernel bank. Without it each row draws its own, and column j stops meaning -- the same thing across rows. SELECT rocket_transform(values, 250, 0, 0, 64) FROM ragged_series; extended_description: | `rocket_transform` implements ROCKET (Dempster, Petitjean & Webb, 2020): it convolves a series with random kernels of random length, dilation, padding and bias, and reduces each kernel's response to two features — the global maximum and the proportion of positive values. No training is involved, so there is no model to fit or store. ``` rocket_transform(series DOUBLE[], kernels_per_group BIGINT, seed BIGINT, first_kernel BIGINT) -> DOUBLE[] ``` Features are interleaved: element `2i` is kernel `i`'s max and `2i+1` its PPV. `first_kernel` selects a contiguous slice of one conceptual kernel bank. Kernel `i` is a pure function of `(seed, i)` — derived through SplitMix64 used as a splittable seed source — so group `g` can be generated without generating groups `0..g-1`, and kernels can be fanned across threads with no shared generator state. This is what makes it practical to split a 10,000-kernel bank into groups narrow enough for a downstream classifier's per-estimator feature budget. Multivariate series go in as `DOUBLE[][]` (channels of timepoints). Each kernel draws a random subset of channels with independent weights per channel and still produces exactly two features, because the selected channels are summed inside a single convolution. A one-channel series produces byte-identical kernels through either overload. For variable-length data, pass an explicit reference length as a fifth argument. Kernel weights do not depend on series length but dilation and padding do, so without it each row draws its own kernel bank and the columns stop being comparable across rows. Note also that the max feature is biased upward by series length while PPV is not — if length correlates with the label, half the features carry that correlation. The pseudo-random stream is specified byte-for-byte in the project's SPEC.md, and the extension is validated against golden vectors emitted by an independent Python implementation: maximum absolute difference 1.8e-15, with PPV differences of exactly zero. The intended use is composition with a tabular foundation model — for example `anofox_tabfm`'s `tabfm_classify` — to classify time series without training anything: features go in as columns, class probabilities come back, and probabilities are averaged across kernel groups. extension_star_count: 2 extension_star_count_pretty: 2 extension_download_count: 716 extension_download_count_pretty: 716 image: '/images/community_extensions/social_preview/preview_community_extension_rocket.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 | |------------------|---------------|-------------|---------|----------| | rocket_transform | scalar | NULL | NULL | | ### Overloaded Functions This extension does not add any function overloads. ### Added Types This extension does not add any types. ### Added Settings This extension does not add any settings.