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

Forecast #118

Open
vincentbernat opened this issue Sep 4, 2022 · 1 comment
Open

Forecast #118

vincentbernat opened this issue Sep 4, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@vincentbernat
Copy link
Member

A nice feature would be to add forecasts to graph visualizations. This would be automatically enabled when the requested time range is in the future.

There exists several models which would work great for flow data, like the Holt-Winters' seasonal method or the ARIMA models.

Prophet is a classic solution for forecasting time series, but it is targeted at R and Python, making the integration a bit more difficult (but doable). It relies on Stan. If it's easy to extract the model, we could use Swig to do the integration. I didn't find the underlying model used. In Go, we could try Dataframes for Go, which includes an implementation of the Holt-Winters method. This may be simple enough. The project seems currently unmaintained though.

An alternative would be to do that in ClickHouse instead. This would make sense because to be able to use seasonality, we need to pull a lot of data and it would be better for everything to stay inside ClickHouse (however, we could use the low resolution tables, so that's not mandatory). ClickHouse does not have builtin support for anything else than simple linear regressions, but there is this presentation in Russian showing how to achieve this with WLMA or simple exponential smoothing. Dunno if it's enough for us.

Once we have forecasting, it is also possible to get anomaly detection!

@vincentbernat vincentbernat added the enhancement New feature or request label Sep 4, 2022
@vincentbernat vincentbernat added this to the Not planned milestone Sep 4, 2022
@vincentbernat
Copy link
Member Author

Extracting the bits from Prophet is not easy. Maybe a solution would be to have a Python companion using Prophet we could query remotely. This is described in here (also, there is another blog post embedding the Python interpreter in Go, but this seems a too early optimization). This could gets us started.

At this point, doing the same stuff inside ClickHouse seems overkill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant