Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was told to start with XGBoost. Is Prophet better?


Xgboost is a classifier for tabular data, prophet is for time series prediction. They are different use cases, though you can likely massage xgboost to do time series prediction if you really wanted to. So the question of which is better is "it depends"


Time delay embedding (i.e. the observed value at different time lags as a feature) is the usual trick to turn time series data into a tabular form for this sort of regression.


You can use XGBoost for both classification and regression. See https://xgboost.readthedocs.io/en/stable/python/python_api.h...


I'm not even sure how you can get it to work on time series...


Check out my top level comment in this thread for a (hopefully clear) example. Sometimes you can rephrase a time series problem into boring classical regression.

It can make the implementation and maintainability of a codebase better (IMHO), without sacrificing predictive power.


Create features for day of week, day of year, month of year, lagged values of y, lagged values of y for each period (eg: 1, 2, 3 weeks and years ago etc). You then predict forward 1 time step at a time.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: