Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

danferns
Copy link
Contributor

@danferns danferns commented Mar 31, 2025

Reference Issues/PRs

Fixes #6602

What does this implement/fix? Explain your changes.

  • The VMD module would discard the last sample when given an odd length sequence.
  • The math has been updated to handle odd length sequences based on this comment. Now the VMD module handles odd length sequences properly.
  • VMD transformer used the hack of duplicating the last sample to achieve an even length sequence, this is no longer necessary and has been removed.
  • A test to check the preservation of odd / even sequence length has been added.

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

No.

What should a reviewer concentrate their feedback on?

  • Quality of test cases.

Did you add any tests for the change?

Yes, to check odd/even length preservation at the VMD transformer.

Any other comments?

Credit goes to Zachery Lorch for providing the core of the fix in the comment linked above. Their name has been added to the module's credits and as the co-author of the commit.

PR checklist

For all contributions
  • I've added myself to the list of contributors with any new badges I've earned :-)
    How to: add yourself to the all-contributors file in the sktime root directory (not the CONTRIBUTORS.md). Common badges: code - fixing a bug, or adding code logic. doc - writing or improving documentation or docstrings. bug - reporting or diagnosing a bug (get this plus code if you also fixed the bug in the PR).maintenance - CI, test framework, release.
    See here for full badge reference
  • Optionally, for added estimators: I've added myself and possibly to the maintainers tag - do this if you want to become the owner or maintainer of an estimator you added.
    See here for further details on the algorithm maintainer role.
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.
For new estimators
  • I've added the estimator to the API reference - in docs/source/api_reference/taskname.rst, follow the pattern.
  • I've added one or more illustrative usage examples to the docstring, in a pydocstyle compliant Examples section.
  • If the estimator relies on a soft dependency, I've set the python_dependencies tag and ensured
    dependency isolation, see the estimator dependencies guide.

@fkiraly fkiraly added enhancement Adding new functionality lib:vmdpy vmdpy onboard library labels Mar 31, 2025
@fkiraly fkiraly changed the title [BUG] Fix VMD odd length data returns even length decomposition &LorchZachery [BUG] Fix VMD odd length data returns even length decomposition Mar 31, 2025
Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Yes, looks accurate. Thanks!

I added a credit to @LorchZachery in the contributors file too.

@fkiraly fkiraly merged commit c46302c into sktime:main Mar 31, 2025
0 of 2 checks passed
@danferns
Copy link
Contributor Author

danferns commented Apr 1, 2025

I added a credit to @LorchZachery in the contributors file too.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding new functionality lib:vmdpy vmdpy onboard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] vmdpy - use with odd length data leads to even length decomposition
2 participants