Naina Chaturvedi Profile picture
Jul 3 25 tweets 7 min read Twitter logo Read on Twitter
✅LSTM and ARIMA model in Time Series Forecasting explained in simple terms and how to use it ( with code).
A quick thread 🧵👇🏻
#Python #DataScience #MachineLearning #DataScientist #Programming #Coding #100DaysofCode #hubofml #deeplearning
Pic credit : MDPI
1/LSTM model - Imagine you have a magical toy that can predict the weather for the next few days. You want to know if it will rain or be sunny each day. To make accurate predictions, the toy needs to remember the patterns it has seen in the past.
2/ An LSTM model is like a smart friend who can remember things really well. It has a special memory that helps it understand and remember patterns in the weather. This memory helps the LSTM model make better predictions about whether it will rain or be sunny.
3/ The LSTM model looks at the weather data from the past, like the temperature, humidity, and wind speed for each day. It tries to find patterns in this data. For example, it might notice that when the temperature is high and the humidity is low, it's usually sunny.
4/ The LSTM model learns these patterns over time. It keeps updating its memory as it sees more and more weather data. Once it has learned these patterns, it can use them to predict the weather for future days.
5/ So, when you give the LSTM model the weather data for the current day, it will use its memory to make a prediction about whether it will rain or be sunny tomorrow. It does this by looking at the patterns it has learned from the past data.
6/ ARIMA model - Imagine you have crystal ball to predict how many cookies you will eat each day. Sometimes you eat more cookies, sometimes you eat fewer cookies. To understand the pattern of your cookie consumption & use it to predict how many cookies you will eat in the future
7/ An ARIMA model is like a smart cookie-eating detective. It tries to figure out the pattern in your cookie consumption by looking at the data from the past. It wants to know if there's a trend or a cycle in your cookie-eating habits.
8/ The ARIMA model looks at the number of cookies you've eaten on different days. It tries to find patterns, like whether you tend to eat more cookies on weekends or if your cookie consumption increases over time.
The ARIMA model then uses these patterns to make predictions.
9/ The ARIMA model also considers how the past patterns affect the future. It takes into account difference b/w the cookie consumption on different days. Eg. if it sees that you ate 5 cookies today and 3 cookies yesterday, it will consider this difference when making predictions
10/ LSTM is a type of neural network specifically designed to handle sequential data like time series. It is particularly useful when the data has long-term dependencies or complex patterns. LSTM models have a memory cell that can store and remember information over long periods.
11/ LSTM models are used:
The time series data has long-term dependencies and complex patterns.
There are seasonal or cyclic patterns in the data.
The data has multiple input features or variables.
There is a need to capture both short-term and long-term dependencies in the data.
12/ Use LSTM when the data has complex patterns, long-term dependencies, or seasonal/cyclic behavior. LSTM models can handle multiple input features and can capture both short-term and long-term dependencies in the data. Implementation -
13/ ARIMA (AutoRegressive Integrated Moving Average): ARIMA is a statistical model that captures the linear dependencies in the data. It is commonly used when the data has a stationary trend, meaning that the statistical properties of the data remain constant over time.
14/ ARIMA models are suitable when:

The time series data has a stationary trend (i.e., the mean, variance, and autocorrelation do not change significantly over time).
The data has a clear linear pattern or trend.
There is no significant seasonal or cyclic component in the data.
15/ Use ARIMA when the data has a stationary trend and a clear linear pattern. ARIMA models are useful for capturing linear dependencies and are simpler to interpret compared to neural networks. Implementation -
16/ LSTM models for univariate time series forecasting - In univariate time series forecasting, we have only one variable or feature to predict the future values. The LSTM model takes a sequence of past values as input and learns to predict the next value in the sequence.
17/ LSTM models for multivariate time series forecasting - In multivariate time series forecasting, we have multiple variables or features that are used to predict the future values. An LSTM model is able to handle multivariate time series by including multiple input features.
18/ LSTM models for multi-step time series forecasting - In multi-step , we aim to predict multiple future time steps instead of just the next time step. An LSTM model can be adapted to perform multi-step forecasting by modifying the o/p layer and training it accordingly.
19/ Bidirectional LSTM: A Bidirectional LSTM is a variant of the LSTM model that processes the input sequence both in forward and backward directions. By considering the past and future context simultaneously, it can capture dependencies in both directions.
20/ CNN LSTM: A CNN LSTM model combines the convolutional neural network (CNN) and LSTM architectures. It uses the CNN layers to automatically extract features from the input sequence and then feeds the extracted features into LSTM layers to capture temporal dependencies.
21/ ConvLSTM: A ConvLSTM model extends the LSTM model by adding convolutional layers before the LSTM layers. It combines the ability of convolutional layers to automatically extract spatial features and the ability of LSTM layers to capture temporal dependencies.
22/ ARIMA (Autoregressive Integrated Moving Average) is a popular model used for time series forecasting. It combines autoregressive (AR), differencing (I), and moving average (MA) components to capture the temporal patterns in the data.
23/ The Autoregressive component captures the relationship between an observation and a certain number of lagged observations. It models the current value of a time series based on its previous values.
24/ Read more -
More -
https://t.co/UHd9wKr93qnaina0405.substack.com
github.com/Coder-World04/…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Naina Chaturvedi

Naina Chaturvedi Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @NainaChaturved8

Jun 19
✅Linear Neural Networks for Regression and Classification explained in simple terms and how to use it (with code).
A quick thread 🧵👇🏻
#Python #DataScience #MachineLearning #DataScientist #Programming #Coding #100DaysofCode #hubofml #deeplearning
Pic credits : Joshua Image
1/ Imagine you have a box with a lot of buttons on it, and each button can give you a different answer. You also have a big list of questions that you want to ask, like "What's the weather like today?" or "Is this a cat or a dog?".
2/ Now, instead of asking just one button at a time, you can connect all the buttons together with wires. When you ask a question, it goes through the wires and each button can help decide the answer a little bit.
Read 24 tweets
Jun 17
✅Time Series Forecasting explained in simple terms and how to use it ( with code).
A quick thread 🧵👇🏻
#Python #DataScience #MachineLearning #DataScientist #Programming #Coding #100DaysofCode #hubofml #deeplearning
Pic credits : ResearchGate Image
1/ Imagine you have a special notebook where you write down the temperature outside every day. You write down the temperature in the morning and also in the afternoon. Now, after a few months, you have a lot of temperature numbers in your notebook.
2/ Time series forecasting is like using magic to predict what the temperature might be in the future. You look at all the numbers you wrote down and try to find a pattern or a trend.
Read 21 tweets
Jun 14
✅Generative Adversarial Networks ( GANs) explained in simple terms and how to use it ( with code).
A quick thread 🧵👇🏻
#Python #DataScience #MachineLearning #DataScientist #Programming #Coding #100DaysofCode #hubofml #deeplearning
Pic credits : ResearchGate Image
1/ Imagine you have two friends, let's call them the "artist" and the "critic." The artist wants to draw something cool, and the critic wants to judge if the drawing is good or not. The artist tries to draw something, and the critic looks at it and says whether it's good or bad.
2/ Now, the artist really wants to improve, so they keep drawing and the critic keeps judging. Over time, the artist gets better and better at drawing because they learn from the critic's feedback. The artist wants to make drawings that the critic will say are really amazing!
Read 25 tweets
Dec 8, 2021
Quick Thread : 5 Cool Advanced Pandas Techniques for Data Scientists

🧵👇🏻
#Python #DataScience #MachineLearning #DataScientist #Programming #Coding #100DaysofCode #hubofml #Pandas
1. Split data using pandas
In the code below, we are splitting the data into a random sample of rows and removing them from the original data after dropping index values.
2. Binning Data
Binning is a technique to group/bin your data into multiple buckets which is very helpful if you dealing with continuous numeric data. In pandas you can bin the data using functions cut and cut. First check the shape of your data i.e no of rows and columns.
Read 7 tweets
Sep 24, 2021
Pandas is a fast, powerful, flexible and open source data analysis and manipulation tool.

A Mega thread 🧵covering 10 amazing Pandas hacks and how to efficiently use it(with Code Implementation)👇🏻
#Python #DataScientist #Programming #MachineLearning #100DaysofCode #DataScience
1/ Indexing data frames
Indexing means to selecting all/particular rows and columns of data from a DataFrame. In pandas it can be done using two constructs —
.loc() : location based
It has methods like scalar label, list of labels, slice object etc
.iloc() : Interger based
2/ Slicing data frames
In order to slice by labels you can use loc() attribute of the DataFrame.

Implementation —
Read 17 tweets
Sep 23, 2021
Projects Alert : 140 Python Projects with Source Code
You don't have to go to a university or pay hefty tuition to learn ML when you can learn for FREE.

An extensive list of 100+ Most Valuable Github Repository for ML, beginner to advanced.
theinsaneapp.com/2021/09/best-g…
#Python #DataScientist #Programming #Machinelearning #100DaysofCode
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(