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

Examples/m4 competition #138

Merged
merged 21 commits into from
Aug 4, 2020
Merged

Examples/m4 competition #138

merged 21 commits into from
Aug 4, 2020

Conversation

Droxef
Copy link
Contributor

@Droxef Droxef commented Jul 13, 2020

M4 competition Benchmark

Summary
Proposition for adding M4 competition benchmark to examples. Add scripts to download dataset, create the timeseries and reproduce the results. Add a notebook to put together the different parts and and visualize some results.

@Droxef Droxef requested review from TheMP, hrzn and pennfranc July 21, 2020 12:06
@@ -95,7 +95,7 @@ def fit(self, series: TimeSeries, component_index: Optional[int] = None):
new_ts = remove_from_series(ts, self.seasonality, model=self.season_mode)

# SES part of the decomposition.
self.model = hw.SimpleExpSmoothing(new_ts.values()).fit()
self.model = hw.SimpleExpSmoothing(new_ts.values()).fit(initial_level=0.2)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to change this in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, it was something that I forgot to clean.
Same for the comments after that

holt = ExponentialSmoothing(seasonal=None, damped=False, trend='additive', seasonal_periods=m)
damp = ExponentialSmoothing(seasonal=None, damped=True, trend='additive', seasonal_periods=m)

# season_mode = ["additive", "multiplicative"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be here if it's commented out?



def train_4theta(ts, n):
# season_mode = ["additive", "multiplicative"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also be here?

return model_class(**best_param_combination)


class FourTheta(UnivariateForecastingModel):
Copy link
Contributor

Choose a reason for hiding this comment

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

This class is already included in the previous PR and merged, right? Or is it some different implementation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The difference is that it uses a modified version of gridsearch that do not create a TimeSeries.
Thus the execution time of the notebook drops from 1h to 5-10 minutes

Copy link
Contributor

Choose a reason for hiding this comment

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

I know it is a pity that using TimeSeries increases the gridsearch time, but if we release this we cannot have a separate implementation, and we should really use the implementation in darts/models, even if it takes much longer to run.

@Droxef Droxef marked this pull request as ready for review August 4, 2020 12:16
@Droxef Droxef merged commit 877d96f into develop Aug 4, 2020
@Droxef Droxef deleted the examples/M4_competition branch August 4, 2020 14:10
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

Successfully merging this pull request may close these issues.

3 participants