winedarksea / AutoTS

Automated Time Series Forecasting
MIT License
1.1k stars 100 forks source link

Is XGBoost accessible? #169

Closed El-Don-Quijote closed 1 year ago

El-Don-Quijote commented 1 year ago

Hi, just a quick question: In the tutorial / installation instruction XGBoost is mentioned as optional package. However, when having a look at the models, I don't know where it is used. Is it accessible at all in AutoTS? Please shed some light on this issue. Looking forward to your answer and thanks for your work!

winedarksea commented 1 year ago

You should see in the model list a number of model names that end in Regression, for example 'WindowRegression' and 'MultivariateRegression' and so on. All of these models are different ways of taking a time series and turning it into an X and Y dataset. The simplest is WindowRegression, it takes a section of history of size N and uses those as X to predict Y, the next step.

Once the X and Y are created, there is then a model, specified by the regression model parameter that learns how to predict Y given X. These include scikit-learn models, lightgbm, xgboost, and some Tensorflow deep learning options. Not all regression models will use all possible ml models (I've done some tuning based off what I've seen actually being most accurate), but they can accept them

winedarksea commented 1 year ago

In the source code, autots/models/sklearn is where xgboost is buried if looking for code

El-Don-Quijote commented 1 year ago

Thanks a lot for your swift & clear answer!

El-Don-Quijote commented 1 year ago

Once the X and Y are created, there is then a model, specified by the regression model parameter that learns how to predict Y given X. These include scikit-learn models, lightgbm, xgboost, and some Tensorflow deep learning options. Not all regression models will use all possible ml models (I've done some tuning based off what I've seen actually being most accurate), but they can accept them

Coming back to this, is there a way to disable Tensorflow deep learning options when choosing e.g. "WindowRegression"? Or an option to specifically only use lightgmb and xgboost?

winedarksea commented 1 year ago

easiest way to get rid of Tensorflow is pip uninstall tensorflow for that environment, or create a new environment where it is not installed.

I don't currently have an option for only lightgbm or xgboost, but I could add one. I am not sure what the use case is for that though, as best to try all available models without inserting human bias as to what should be best.

winedarksea commented 1 year ago

I do have a way to force only neuralnets, models_mode='neuralnets' and my solution for forcing other model types would be to insert another models_mode (only applies to newly generated models, not imported templates)

El-Don-Quijote commented 1 year ago

easiest way to get rid of Tensorflow is pip uninstall tensorflow for that environment, or create a new environment where it is not installed.

I don't currently have an option for only lightgbm or xgboost, but I could add one. I am not sure what the use case is for that though, as best to try all available models without inserting human bias as to what should be best.

My scientific mind totally agrees with you concerning the insertion of human bias. My more pragmatic mind does sometimes prefer Gradient Boosted Tree Methodes, having to deal with limited time and computing power. So I think it would be a great addition to autoTS to allow for, e.g. models_mode='gradient-boosting'.

winedarksea commented 1 year ago

Now in the dev branch, models_mode = "gradient_boosting" should be out in version 0.5.5 which I expect will be released within the next week or so.

El-Don-Quijote commented 1 year ago

That was fast and this is really great! Thank you!