Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equivalent to fit_trend but for seasonality? #27

Open
KevinG1002 opened this issue Aug 23, 2024 · 3 comments
Open

Equivalent to fit_trend but for seasonality? #27

KevinG1002 opened this issue Aug 23, 2024 · 3 comments

Comments

@KevinG1002
Copy link

Hello,

I noted the existence of the function fit_trend that returns a regressor matrix and polynomial coefficients of some pre-specified order n. I was wondering if a similar function existed to fit for seasonality? When using the analyze function, how are the periodic signals extracted?

Best,

Kevin

@baggepinnen
Copy link
Owner

The seasonality is captured by the autoregressive models

@KevinG1002
Copy link
Author

What do you exactly mean by that? I guess my question was not specific enough: I recall that when running analyze a Matrix was returned with points belonging to the seasonal component extracted from the original signal passed into analyze. I understand the autoregressive models capture these but is there a way within your framework to extract the parametric values that yield these seasonal components so that one could potentially manipulate these and/or plot seasonal components several forecasting steps ahead?

Thanks,

Kevin

@baggepinnen
Copy link
Owner

The PredictionData structure looks like this

mutable struct PredictionData
    trend_parameters
    trend_regressor
    seasonal_models
    seasonal_predictions
end

the seasonal_models contain AR models from which you can get the parameters using the function ControlSystemsBase.denvec. The AR models themselves are transfer functions from ControlSystemsBase and they are estimated using ControlSystemIdentification.jl.

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

No branches or pull requests

2 participants