Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This update addresses discrepancies in the Weighted Moving Average (WMA) functionality and its corresponding test cases.
Key Changes
Corrected Unit Test Assertions:
Updated the expected values in the test cases based on manual recalculations of the WMA formula.
Ensured the expected results match the implementation for both default linear weights and custom weights.
Validated WMA Implementation:
Verified the correctness of the WMA calculation for different scenarios, including grouped and ungrouped data.
Tested with varying window sizes and weights.
Improved Test Coverage:
Ensured tests cover edge cases, such as insufficient data for rolling calculations.
Included assertions for grouped and non-grouped datasets.
Outcomes
The Weighted Moving Average functionality is now thoroughly validated and aligned with the expected behavior.
All tests pass successfully, confirming the correctness of the implementation.
This update strengthens the reliability of the WMA feature in the data transformation module.