Skip to content

[ENH] add isj bandwidth option to kernel base models#989

Open
NandiniDhanrale wants to merge 2 commits intosktime:mainfrom
NandiniDhanrale:issue-980-isj-kernel-bandwidth
Open

[ENH] add isj bandwidth option to kernel base models#989
NandiniDhanrale wants to merge 2 commits intosktime:mainfrom
NandiniDhanrale:issue-980-isj-kernel-bandwidth

Conversation

@NandiniDhanrale
Copy link

Summary

  • add "isj" as a supported automatic bandwidth rule for KernelMixture
  • extend NadarayaWatsonCDE.y_bandwidth to accept "isj" for the 1D target-kernel path
  • add focused tests for the new rule and degenerate-target fallback behavior

Testing

  • py -3.11 -m pytest -o addopts= skpro/regression/tests/test_bandwidth.py skpro/distributions/tests/test_kernel_mixture.py skpro/regression/tests/test_nadaraya_watson.py -q

Fixes #980

@patelchaitany
Copy link
Contributor

@NandiniDhanrale You can drop this test file. params6 in get_test_params already runs the ISJ path end-to-end through the framework. The "matches helper" test calls bandwidth_1d on both sides, so it's really just checking a == a. If you want to keep the degenerate fallback check, put it in test_bandwidth.py as a unit test on bw_isj_1d.

@NandiniDhanrale
Copy link
Author

Addressing the duplicate-coverage point:

  • dropped skpro/regression/tests/test_nadaraya_watson.py
  • moved the degenerate-data fallback into bw_isj_1d, so the shared helper owns that behavior
  • added the focused degenerate fallback check in skpro/regression/tests/test_bandwidth.py
  • kept the public-surface coverage through get_test_params / framework tests

Re-ran:

  • py -3.11 -m pytest -o addopts= skpro/regression/tests/test_bandwidth.py skpro/distributions/tests/test_kernel_mixture.py -q
  • py -3.11 -m pytest -o addopts= skpro/regression/tests/test_all_regressors.py -k NadarayaWatsonCDE -q

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] add "ISJ" bandwidth option to kernel base models

2 participants