Skip to content

[ENH] Add EvoForestTSWM collection transformer (frozen closed-form feature extractor)#3569

Open
kayuksel wants to merge 3 commits into
aeon-toolkit:mainfrom
kayuksel:evoforest-tswm
Open

[ENH] Add EvoForestTSWM collection transformer (frozen closed-form feature extractor)#3569
kayuksel wants to merge 3 commits into
aeon-toolkit:mainfrom
kayuksel:evoforest-tswm

Conversation

@kayuksel

Copy link
Copy Markdown

Reference Issues/PRs

Proposes the estimator discussed in #3568.

What does this implement/fix? Explain your changes.

Adds EvoForestTSWM, a feature_based collection transformer — a peer of Catch22/MiniRocket.

  • No learned weights. φ is 18 closed-form feature families (141 columns over a length-64 patch) over seeded random-projection banks (fixed integer seeds). fit_is_empty=True. The banks ship embedded (~8 KB base64), so the transform is numerically identical to the published encoder with no torch and no data file.
  • numba-only (a core aeon dep). One @njit per-patch kernel with prange; the 3 FFT families use precomputed DFT matrices so the whole kernel is nopython.
  • Two sizes: pooling="full" → 423, pooling="pruned" → 245.
  • Multivariate via channel-independent pooling (output width independent of channel count); handles unequal length.

Evidence (frozen φ + RidgeClassifierCV, one protocol, no per-dataset tuning): highest mean accuracy on the full UCR archive (106) at 0.8223 vs MiniRocket-10k 0.8210 / MSRF 0.8116 / catch22 0.6921, at 24×/3.3× fewer features; by average rank statistically tied with MiniRocket-10k and MSRF (Nemenyi CD=0.46). Frozen transfer to multivariate UEA: +0.094 over catch22, within 0.016 of MiniRocket-MV.

Does your contribution introduce a new dependency? If yes, which one?

No — numba only (already a core dependency).

Any other comments?

PR checklist

  • The PR title starts with [ENH].

EvoForestTSWM is a frozen, closed-form, interpretable feature transform
(feature_based) in the same family as Catch22/MiniRocket: 18 closed-form
feature families (141 columns over a length-64 patch) pooled by
mean||std||max to 423 (or a discovered 245-dim subset). No learned weights
(a fixed function of seeded banks, embedded ~8KB), numba-only, multivariate
via channel-independent pooling, handles unequal length. Passes
check_estimator (23/23). See aeon-toolkit#3568.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aeon-actions-bot aeon-actions-bot Bot added enhancement New feature, improvement request or other non-bug code enhancement transformations Transformations package labels Jun 25, 2026
@aeon-actions-bot

Copy link
Copy Markdown
Contributor

Thank you for contributing to aeon

I have added the following labels to this PR based on the title: [ enhancement ].
I have added the following labels to this PR based on the changes made: [ transformations ]. Feel free to change these if they do not properly represent the PR.

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, please run pre-commit locally and push the fixes to your PR branch.

Don't hesitate to ask questions on the aeon Discord channel if you have any.

PR CI actions

These checkboxes will add labels to enable or disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

  • Run pre-commit checks for all files
  • Run mypy typecheck tests
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Disable numba cache loading
  • Regenerate expected results for testing
  • Push an empty commit to re-run CI checks

…ernel family)

Upgrades the encoder to the v2 champion: adds the hydra_compete family (soft
competing-kernel win-count histograms, sqrt-compressed, raw + first-difference
channels; a soft-counting variant of Hydra's readout), re-freezes the embedded
banks (adds hydra_w), updates the pruned pooling map (519 -> 211 dims), and
refreshes the frozen regression fingerprints.

Full UCR archive (one ridge protocol): 0.8264 mean accuracy (vs MiniRocket-10k
0.8210, MSRF-1410 0.8116), held-out-55 0.7957, 5-shot 0.7154 -- at 19x fewer
features than MiniRocket-10k. Numerically verified against the reference torch
champion (end-to-end max abs diff 1.9e-6; numba vs numpy 9.7e-14).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kayuksel

kayuksel commented Jul 3, 2026

Copy link
Copy Markdown
Author

Updated the PR in place to the v2 encoder: 19 families / 173 formulas / 519 dims (pruned variant 211). The new 19th family is a compact soft-counting variant of Hydra's competing-kernel readout, adopted through the same blind lock-box gate as the rest of the encoder. Full-archive numbers under one ridge protocol: 0.8264 mean accuracy (MiniRocket-10k 0.8210, MSRF-1410 0.8116), held-out-55 0.7957, 5-shot 0.7154. Embedded banks re-frozen (+hydra_w); regression fingerprints refreshed; end-to-end parity vs the reference implementation 1.9e-6 (numba vs numpy 9.7e-14). No API changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kayuksel

kayuksel commented Jul 3, 2026

Copy link
Copy Markdown
Author

CI triage: pre-commit is now green after the formatting commit. The remaining failure — pytest (macOS-14, 3.14) — is unrelated to this PR: the job runs 6,456 tests, 6,455 pass (including all EvoForestTSWM tests), and the single failure is aeon/clustering/averaging/tests/test_kasba.py::test_kasba_distance_params[distance6] (TypeError: bad argument type for built-in operation under Python 3.14), which fails identically on both runs of this branch and doesn't touch any file in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, improvement request or other non-bug code enhancement transformations Transformations package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant