YouTube Video Review: Time Series Forcasting with XGBoost: Use Python and machine learning to predict energy consumption

2 min readJul 10, 2022

For the past several days I have been brushing up on time series forecasting to enable me to improve upon my existing skill set. I therefore came across a video of less than half an hour that went over the code to use machine learning and XGBoostRegressor to make predictions on energy consumption in the US. I decided to watch the video and use the techniques that the content creator advised to see if I could obtain comparable results in my predictions by employing the techniques he suggested:-

Time series forecasting is a very serious problem that data scientists face when they want to take data and predict future events.

XGBoost is one of the best out of the box machine learning libraries to use on tabular data and even time series problems.

The different types of time series data are:-

  1. Purely random with no recognizable pattern
  2. Curvilinear trend (quadratic, experimental)
  3. Increasing linear trend
  4. Seasonal pattern
  5. Seasonal pattern plus seasonal growth

The dataset used in this video had a seasonal pattern, which I discussed in the code review that I made for the subject time series forecast.

I have prepared a code review to accompany this blog post and it can be viewed here:-


I have close to five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.