Multivariate MultiStep LSTM

Rupak (Bob) Roy - II
2 min readJan 20, 2022

--

Powerful Approach Forecasting beyond dataset

Hi, how things are up to? good great better? i hope its all good.

Today i will demonstrate you how to perform multi-variate and multistep forecasting, which means forecasting beyond the dataset.

We have seen tons of examples, all are claiming multivariate and not multistep, similarly multistep but multivariate LSTM, very difficult to get a proper example.

So i took the initiative to write a proper example that can be used as a template.

If you wish to understand more about LSTM how it works? tons of articles available on google or you can simply follow my previous articles' very in-detail workflow of LSTM, Follow the link below

The intuition behind Multi-Variate Multi-Step LSTM output is as shown below.

Photo credit: google

Let’s get started, shall we?

We will be using the famous air pollution dataset which i will be sharing with you in the end

Lstm Multivariate Multi-Step: Load Data

Data Pre-processing Step — — — — —

Multivariate MultiStep: Data Preprocessing

#Split the sequence

Multivariate MultiStep LSTM: Split Sequence

Do the Train and Test split

Multivariate MultiStep LSTM: Train, Test Split

That's it! we are done… now its time to predict

Multivariate MultiStep LSTM: Predict

Now call the predict function, that's it.

Multivariate MultiStep LSTM: Prediction

Congratulations, we can now apply MultiStep MultiVariate LSTM

I tried my best to keep to the point without wasting much time running across. Check out the kaggle implementation:

YouTube:

Thanks, for your time, if you enjoyed this short article there are tons of topics in advanced analytics, data science, and machine learning available in my medium repo. https://medium.com/@bobrupakroy

Some of my alternative internet presences Facebook, Instagram, Udemy, Blogger, Issuu, Slideshare, Scribd and more.

Also available on Quora @ https://www.quora.com/profile/Rupak-Bob-Roy

Let me know if you need anything. Talk Soon.

--

--

Rupak (Bob) Roy - II
Rupak (Bob) Roy - II

Written by Rupak (Bob) Roy - II

Things i write about frequently on Medium: Data Science, Machine Learning, Deep Learning, NLP and many other random topics of interest. ~ Let’s stay connected!

No responses yet