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

Option to pass "smoothing_level" to ES model #2024

Closed
nitesh4it opened this issue Oct 10, 2023 · 4 comments · Fixed by #2059
Closed

Option to pass "smoothing_level" to ES model #2024

nitesh4it opened this issue Oct 10, 2023 · 4 comments · Fixed by #2059
Labels
feature request Use this label to request a new feature good first issue Good for newcomers

Comments

@nitesh4it
Copy link

Is your feature request related to a current problem? Please describe.
Yes, we are using ES model to predict the value of the timeseries, now when the next point is being predicted, it is giving a very high weightage to the last point(s). So say if there was a drop in actual data for the last 2 points only, the predicted value goes down

Describe proposed solution
Exponential smoothing model provides the option to pass "smoothing_level" bounds which is not in Darts. If we get the option to pass this smoothing_level to ES via darts. It would probably resolve the issue. we can have a cap to restrict the weightage.

@nitesh4it nitesh4it added the triage Issue waiting for triaging label Oct 10, 2023
@dennisbader
Copy link
Collaborator

dennisbader commented Oct 10, 2023

Hi @nitesh4it, and thanks for writing.

We support the fit_kwargs at model creation where you can add the smoothing_level. See the Darts ES docs here and the ES fit docs here.

@madtoinou madtoinou added question Further information is requested and removed triage Issue waiting for triaging labels Oct 17, 2023
@nitesh4it
Copy link
Author

Thanks for the suggestion. On further checking i found that we can pass a value as smoothing_level in the kw_args and that same value is picked
But what i meant to ask was, when i init ES model i do have the option to pass a range to it and an optimised value for smoothing_level is picked from that range. I wanted to have that bounds option in darts as well. Is that already supported? Am i missing something here?

es = ExponentialSmoothing(
timeseries.values(),
seasonal=model.model_params['seasonal'].value,
trend=model.model_params['trend'].value,
seasonal_periods=model.model_params['seasonal_periods'],
freq=timeseries.freq,
dates=timeseries.time_index,
bounds={"smoothing_level": (0, 0.7)}
)

I have the option to pass bounds={"smoothing_level": (0, 0.7)} in it. and an optimal value is then picked from the range

@nitesh4it
Copy link
Author

nitesh4it commented Nov 7, 2023

@dennisbader @madtoinou Could you please have a look again

@madtoinou
Copy link
Collaborator

Hi @nitesh4it,

Please avoid pinging us with such a short delay after the last message.

The bounds parameter of the statsmodel implementation of Exponential smoothing is not exposed by Darts, but it could easily be implemented.

I am reopening this issue and will open an PR to address it soon.

@madtoinou madtoinou reopened this Nov 7, 2023
@madtoinou madtoinou added feature request Use this label to request a new feature good first issue Good for newcomers and removed question Further information is requested labels Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Use this label to request a new feature good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants