Skip to content

Conversation

TremaMiguel
Copy link
Contributor

Describe the changes you've made

Check seasonal period in data through sktime's autocorrelation_seasonality_test function.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

No tests need.

Describe if there is any unusual behaviour of your code(Write NA if there isn't)

A clear and concise description of it.

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

Copy link
Member

@Yard1 Yard1 left a comment

Choose a reason for hiding this comment

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

LGTM

except KeyError:
raise ValueError(
f"Unsupported Period frequency: {seasonal_parameter}, valid Period frequencies: {', '.join(SeasonalParameter.__members__.keys())}"
)

self.seasonal_parameter = seasonal_parameter
Copy link
Collaborator

Choose a reason for hiding this comment

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

If seasonal parameter is a string, will the previous statement not be overwritten by this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I was missing assigning this case when seasonal_parameter is integer.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks @TremaMiguel , Can you add unit tests to test for these 2 cases (type of the argument)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean testing the exceptions raised seasonal_parameter parameter must be an int or str and Unsupported Period frequency ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, that could be one of them. In addition, I was referring to specifically testing passing of int and str values and checking that the internal values are set correctly.

@ngupta23 ngupta23 merged commit c4df12e into time_series Apr 29, 2021
@TremaMiguel TremaMiguel deleted the seasonality_check branch April 29, 2021 13:49
@ngupta23 ngupta23 added time_series Topics related to the time series and removed time_series_dev labels Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
time_series Topics related to the time series
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants