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

Skip to content

Conversation

@turbotimon
Copy link

@turbotimon turbotimon commented Feb 18, 2025

Proposed changes with explanation, see #9509

It's my "very first issue" for statmodels, please tell me if something needs to be improved

trend = seasonal_decompose(x, period=freq).trend
assert_equal(trend[0], np.nan)

trend = seasonal_decompose(x, period=freq, extrapolate_trend=5).trend
Copy link
Member

Choose a reason for hiding this comment

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

Could you rename Freq to period in these tests? Sounds like Freq is not used at all, aside from the keyword.

Copy link
Author

Choose a reason for hiding this comment

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


if extrapolate_trend == "freq":
# 'freq' is still accepted for legacy purposes
if extrapolate_trend in ("freq", "period"):
Copy link
Member

Choose a reason for hiding this comment

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

Ideally we would deprecate 'freq' here and warn that 'freq' will error after the 0.16 release.

Copy link
Author

@turbotimon turbotimon Feb 18, 2025

Choose a reason for hiding this comment

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

Agree. Can you please check and tell me if I need to do something more with respect to deprecating it?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][DOC] description of extrapolate_trend in seasonal_decompose wrong description of freq instead of period

3 participants