From the course: AI-Powered Time Series Forecasting with Python

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Online prediction

Online prediction

Let's find out how online prediction systems work, and how they can be applied in our near-time scenario. Remember, our goal is to predict the next 24 hours of energy demand given the most recent data that we have. Let's simulate new data coming in. Insert a new code cell, go to the code-along file and copy this block of code over here. Paste it in. And again what this is doing is just importing our scripts, importing our YAML file, defining a date time which was not in the training data set, and then applying our mini batch function where we just select the latest offset of hours required for online prediction. And that's how our feature data set looks. Great. Now let's load our model. Go over here, copy this code and paste it there. And let's run our prediction. So you can see this is the prediction, the next 24 hours of energy demand, given this dataset over here. How well is this prediction? Well let's find out. Go over to our code file. Copy this and paste it here. So this code…

Contents