Skip to content

[ENH] Implement NBeatsKAN in v2 interface - #2383

Open
Dev10-sys wants to merge 1 commit into
sktime:mainfrom
Dev10-sys:feature/nbeatskan-v2
Open

[ENH] Implement NBeatsKAN in v2 interface#2383
Dev10-sys wants to merge 1 commit into
sktime:mainfrom
Dev10-sys:feature/nbeatskan-v2

Conversation

@Dev10-sys

@Dev10-sys Dev10-sys commented Aug 16, 2026

Copy link
Copy Markdown

Reference Issues/PRs

Partially addresses #1736 and #1992.

What does this implement/fix? Explain your changes.

Adds a v2 implementation of NBeatsKAN as NBeatsKAN_v2.

  • Implemented NBeatsKAN_v2 inheriting from BaseModel with Kolmogorov-Arnold Network (KAN) spline layers (Generic, Seasonal, and Trend blocks).
  • Implemented NBeatsKAN_pkg_v2 inheriting from Base_pkg.
  • Added unit and estimator compliance tests in tests/test_models/test_nbeatskan_v2.py.

What should a reviewer concentrate their feedback on?

  • KAN block integration (NBEATSGenericBlockKAN, NBEATSSeasonalBlockKAN, NBEATSTrendBlockKAN) with DataModule metadata inputs
  • Package metadata in NBeatsKAN_pkg_v2

Did you add any tests for the change?

  • Added tests/test_models/test_nbeatskan_v2.py with check_estimator compliance.

PR checklist

  • Title starts with [ENH]
  • Added tests (tests/test_models/test_nbeatskan_v2.py)
  • Used pre-commit hooks

@Dev10-sys
Dev10-sys force-pushed the feature/nbeatskan-v2 branch 2 times, most recently from a24e2cb to 7c371c0 Compare August 16, 2026 11:20
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.86792% with 13 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@062aeb4). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ch_forecasting/models/nbeats/_nbeats_adapter_v2.py 91.93% 5 Missing ⚠️
pytorch_forecasting/models/nbeats/_nbeats_v2.py 91.83% 4 Missing ⚠️
pytorch_forecasting/models/nbeats/_nbeatskan_v2.py 92.30% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2383   +/-   ##
=======================================
  Coverage        ?   88.29%           
=======================================
  Files           ?      201           
  Lines           ?    11262           
  Branches        ?        0           
=======================================
  Hits            ?     9944           
  Misses          ?     1318           
  Partials        ?        0           
Flag Coverage Δ
cpu 88.29% <93.86%> (?)
pytest 88.29% <93.86%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dev10-sys
Dev10-sys force-pushed the feature/nbeatskan-v2 branch from 7c371c0 to 8080be5 Compare August 16, 2026 16:30

@phoeenniixx phoeenniixx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!
Can you also look at #2373, maybe we can use the adapter here to make things easier. You can stack this PR on #2373.

FYI @Faakhir30

@phoeenniixx phoeenniixx added enhancement New feature or request module:models ptf-v2 Related to `pytorch-forecasting` v2 labels Aug 17, 2026
@Dev10-sys
Dev10-sys force-pushed the feature/nbeatskan-v2 branch from 8080be5 to 222995c Compare August 18, 2026 18:33
@Faakhir30

Copy link
Copy Markdown
Member

@Dev10-sys for stacking upon adapter being contributed in #2373 , you can do:

git pull https://github.com/faakhir30/pytorch-forecasting nbeatsv2

And, then use that adapter instead of BaseModel as base class.

@Dev10-sys
Dev10-sys force-pushed the feature/nbeatskan-v2 branch 3 times, most recently from 751b9ea to 42d4e5e Compare August 20, 2026 19:54
@Dev10-sys
Dev10-sys requested a review from phoeenniixx August 20, 2026 23:00
@Dev10-sys
Dev10-sys force-pushed the feature/nbeatskan-v2 branch 4 times, most recently from 47d5b17 to 6ce3652 Compare August 21, 2026 18:53
Implemented NBeatsKAN_v2 inheriting from NBeatsAdapterV2 with Kolmogorov-Arnold Network (KAN) spline layers. Added NBeatsKAN_pkg_v2 package container inheriting from Base_pkg with multi-fixture test configurations integrated into the unified estimator test suite.
@Dev10-sys
Dev10-sys force-pushed the feature/nbeatskan-v2 branch from 6ce3652 to 517e18c Compare August 23, 2026 10:08
@Dev10-sys

Copy link
Copy Markdown
Author

@phoeenniixx @Faakhir30 I have made the requested changes. Please review.

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

Labels

enhancement New feature or request module:models ptf-v2 Related to `pytorch-forecasting` v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants