Member-only story
Hands On Monotonic Time Series Forecasting with XGBoost, using Python
This is how to use XGBoost in a forecasting scenario, from theory to practice

A couple of months ago, I was on a research project and I had a problem to solve involving time series.
The problem was fairly straightforward:
“Starting from this time series with t timesteps, predict the next k values”
For the Machine Learning enthusiasts out there, this is like writing “Hello World”, as this problem is extremely well known to the community with the name “forecasting”.
The Machine Learning community developed many techniques that can be used to predict the next values of a timeseries. Some traditional methods involve algorithms like ARIMA/SARIMA or Fourier Transform analysis, and other more complex algorithms are the Convolutional/Recurrent Neural Networks or the super famous “Transformer” one (the T in ChatGPT stands for transformers).
While the problem of forecasting is a very well-known one, it is maybe less rare to address the problem of forecasting with constraints.
Let me explain what I mean.
You have a time series with a set of parameters X and the time step t.
The standard time forecasting…