Time Series Forecasting With RNN(LSTM)| Complete Python Tutorial|

Поділитися
Вставка
  • Опубліковано 24 січ 2025

КОМЕНТАРІ • 232

  • @smvnt3803
    @smvnt3803 Рік тому +12

    After spending hours reading documentation to understand everything... This short video was what I really needed!

  • @AlankritIndia
    @AlankritIndia 3 роки тому +49

    Too good brother! The entire LSTM code explained line by line with the underlying concepts within 15 min! Much appreciated. You're a great teacher!

    • @NachiketaHebbar
      @NachiketaHebbar  3 роки тому +1

      Thanks!

    • @gdpraveenkumar823
      @gdpraveenkumar823 3 роки тому +1

      @@NachiketaHebbar Hai
      Kindly make a video how to access GitHub programming file , alter the coding for our own dataset

    • @strongsyedaa7378
      @strongsyedaa7378 3 роки тому

      @@NachiketaHebbar
      What's the role of generators in time series?

    • @ruhiruhi9638
      @ruhiruhi9638 Рік тому

      Can u plz explain for LSTM model for exogenous variables

  • @hakamabushanab5430
    @hakamabushanab5430 3 роки тому +2

    Man, you are already an scientist, keep the great work

  • @AlphaRhoDelta
    @AlphaRhoDelta Рік тому +1

    The fact that you're making it so clear and simple 👏👏👏

  • @AkshayGhadi01
    @AkshayGhadi01 3 роки тому

    You have become popular in my college, here in dublin..you are saving our life's here...simple and lucid videos...thanks a ton..

  • @sechabapeter
    @sechabapeter 3 роки тому +2

    You are the best Brother, Thanks for saving my life. Udemy couldn't explain it better than you

    • @NachiketaHebbar
      @NachiketaHebbar  3 роки тому +1

      Glad to help, and thanks for such a kind comment!

  • @robertandrews7211
    @robertandrews7211 Рік тому +1

    This video was so helpful. You did a very nice job explaining how the batch training of predictions works. Thank you, Nachiketa!

  • @Mrmayanksanadhya
    @Mrmayanksanadhya 3 роки тому

    it is the best video for LSTM on UA-cam.

  • @farhatiqb
    @farhatiqb 3 роки тому +31

    Well explained. Can you please make a tutorial on Multivariate (explanatory variables) Multistep (more than 1 step ahead) time series forecasting using LSTM?

    • @SimplytheBest23
      @SimplytheBest23 2 роки тому

      Did you find any good video for LSTM Multivariate Model?

    • @farhatiqb
      @farhatiqb 2 роки тому

      @@SimplytheBest23 No.

    • @quantlfc
      @quantlfc Рік тому

      I think you can write your custom training and test data generation functions for this, and then just plug it into an LSTM. Don't use the TimeSeriesGenerator provided by keras.

    • @MaataKaBhakt
      @MaataKaBhakt 2 місяці тому

      Yes you just have to increase features dimensions by number of features

  • @prasannalahiru
    @prasannalahiru 3 роки тому +6

    how do we predict another three months production using this?

  • @erickarwa-0705
    @erickarwa-0705 3 роки тому +1

    For the first time, I have found one that helps me follow the whole concept. Thank you.
    And that time series generator was new to me. It makes the work quite simple.

  • @girishchhonkar9391
    @girishchhonkar9391 3 роки тому

    Always love your content !!!keep making videos man

  • @MouseWhisperer11
    @MouseWhisperer11 2 роки тому

    This is a very well presented and articulated walkthrough. Good work.

  • @prathipmathavan3089
    @prathipmathavan3089 2 місяці тому

    Get this man a trophy!

  • @zamazenta1728
    @zamazenta1728 Рік тому

    Beautifully explained!!! Thanks a lot.

  • @sasindumadushan9863
    @sasindumadushan9863 3 роки тому

    This video was help me lot to do my research... thanx brother... please do more content like this. you are awesome

  • @Ankit-hs9nb
    @Ankit-hs9nb 2 роки тому

    simple and precise bro! awesome!

  • @kaianchan7768
    @kaianchan7768 2 роки тому +9

    Thanks for the tutorial. Btw, can you provide the tutorials on multi-variate and multi-step method on time series prediction? It's also a popular and useful topics. Thanks!!!

  • @K4pio
    @K4pio 2 роки тому

    I have a problem. I do exacly the same what you did and my model predict the same values. What can i do?

  • @nextReanimation
    @nextReanimation 2 роки тому +1

    How should I change the code for future predictions? If I am happy with the modell, how do I apply it to the whole dataset to truely predict values in the future?

  • @VCodes
    @VCodes 3 роки тому +1

    short and to the point. thx a lot.

  • @MuhammadImran-oc3vi
    @MuhammadImran-oc3vi 3 роки тому +2

    Hi,
    "Cannot convert a symbolic Tensor (lstm_11/strided_slice:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported"
    How to resolve this type of problem?????

    • @ramirotapia2217
      @ramirotapia2217 3 роки тому +1

      Same problem here with:
      model.add(LSTM(100, activation='relu', input_shape=(n_input, n_features)))

  • @TeluguBlockChain
    @TeluguBlockChain 8 місяців тому

    Good job Boy!!! Well explained

  • @rgmgurukula
    @rgmgurukula Рік тому

    Thanks Bhai. Got one SCI publication in Q2 based one your video❤❤❤❤❤

  • @adrianrs79
    @adrianrs79 2 роки тому

    Really good video, well done, subscribed!

  • @psii
    @psii 3 роки тому

    Really helpful, keep making such videos

  • @islamisthepath786
    @islamisthepath786 2 роки тому

    can this be used in a multivariable prediction? where we have more than one columns in a dataset but we want to only predict one column?

  • @juliabarbosa434
    @juliabarbosa434 3 місяці тому

    Amazing explanation! thank you

  • @nehapant1027
    @nehapant1027 3 роки тому

    Very well explained. Thank you so much.!!!

  • @prafulh5252
    @prafulh5252 2 роки тому

    Please do a Video on Multivariate Time Series modelling using LSTM. I like the your natural way of explanation..! keep it up!

  • @jayasreecarey7843
    @jayasreecarey7843 2 місяці тому

    Thanks for detailed explanation.

  • @jeyasheelarakkinimj6534
    @jeyasheelarakkinimj6534 Рік тому

    i found this really simple and handy

  • @namadivinodkumar9755
    @namadivinodkumar9755 2 роки тому

    Hey Nachiketa Hebbar, i tried the above time series with Oscilloscope data having 10,00,000 dataset. While trying to fit the model using('model.fit(gnerator, epoch=50)) code got stuck.
    please help me

  • @pujaadityawinata5703
    @pujaadityawinata5703 3 роки тому

    Pls someone help me. A have dataset start from 2017-01-07, 2017-01-14, 2017-01-21, 2017-01-28, and repeat 2017-02-07...how do i make df.index.freq for that cuz when i use 'W' it dosen't work

  • @MrsDyarvane
    @MrsDyarvane 2 роки тому +1

    Hi , i'm getting an error when i try to change the frequency to Day, the Alias im trying to use is "D" instead of "MS" but i'm getting an error and i'm still getting an error.

    • @aroundwithbae5193
      @aroundwithbae5193 Рік тому

      its monthly data so he explicitly defined it as MS . Its not daywise data so it wont convert to days for u

  • @parrot-media
    @parrot-media 3 роки тому +1

    Thanks a lots Bro! But How to compute an accuracy measure based on RMSE? foreexample on your case RMSR is 26.04. so what is the accuracy of the model in %?? please help me ! please ! I am comfused!

    • @nelsymtsweni7325
      @nelsymtsweni7325 Рік тому

      Here is the answer:
      import numpy as np
      import pandas as pd
      from sklearn.metrics import mean_absolute_percentage_erro
      # Assuming you have the true test values in a 'TrueValues
      # test['TrueValues'] = true_values
      # Calculate the MAPE (Mean Absolute Percentage Error) bet
      mape = mean_absolute_percentage_error(test['Production'],
      # Convert MAPE to percentage format (0-100)
      percentage_accuracy = (1 - mape) * 100
      # Display the percentage accuracy
      print(f"Percentage Accuracy: {percentage_accuracy:.2f}%")

  • @ywf98
    @ywf98 3 роки тому

    thanks this video for make me easy to understanding and i will make reference for my thesis trial :) hehe

  • @iotunlimit9164
    @iotunlimit9164 3 роки тому +1

    I have multiple variables.. does this help in multivariate forecasting?

  • @JStream
    @JStream 3 роки тому

    Hello hoping this could get answered. But im getting an error with the input_shapes is that it is expecting (None, None, 1), found shape=(None, 3, 3). I have been following your discussion but can't seem to get pass this. I'm already at the epochs part but im stuck because of that. Please help :(

  • @nitheeshrkm1858
    @nitheeshrkm1858 2 роки тому +1

    can you make another video for multi feature time series forecasting?i couldnt figure out what to do for that

  • @86Maryj
    @86Maryj 11 місяців тому

    Hi I've time duration column in mm ss format.. getting error can't assign to call function

  • @bhavs1648
    @bhavs1648 2 роки тому

    My Data has hourly records for dates. It doesn't have all the hours. I can't view the Seasonal_Decompose because the freq can't be set.

  • @riyazbagban9190
    @riyazbagban9190 2 роки тому

    when i am running test prediction shell its continuously running its not stopping since 5 to 10 minut what is wrong with code if you could solve this i will be grateful
    thank you

  • @shuchisingh6189
    @shuchisingh6189 Рік тому

    What does basically mean of trend , seasonal and residual . How all of them is diffrent though?

  • @Mavyrle
    @Mavyrle 3 роки тому

    Best tutorial EVER

  • @todorowael
    @todorowael 10 місяців тому

    Great explanation, thank you!

  • @hanazubair
    @hanazubair 2 роки тому

    After training and testing the model how to use it for forecasting into the future?how to modify the code for that?

  • @dasgupts10
    @dasgupts10 3 роки тому +1

    n_input = 3 How do I decide the value?

  • @NAMURecords
    @NAMURecords 3 роки тому +3

    Hello, great Tutorial! I tried to reconstruct your tutorial and ran into an error in this line:
    model.add(LSTM(100, activation='relu', input_shape=(n_input, n_features)))
    I get the Error:
    NotImplementedError: Cannot convert a symbolic Tensor (lstm/strided_slice:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported
    Do you have an Idea whats the problem?
    Thanks in advance!

  • @felipecallpa3757
    @felipecallpa3757 3 роки тому +1

    Thanks !!!!!! i love uuuuuu for this hahaha i use this for my work :)

  • @eduardhermesanschau9590
    @eduardhermesanschau9590 3 роки тому +1

    Hello. Do you know if the TimeSeriesGenerator class is a cross-validation method itself?

  • @faimanaeem9093
    @faimanaeem9093 11 місяців тому

    Hey
    I'm currently working on data which contain 19 values how i can make a code to forecast next 10 years values

  • @ahmedismailbinamrai1080
    @ahmedismailbinamrai1080 26 днів тому

    This is great video, thank you

  • @abhishekrameshnerkar2026
    @abhishekrameshnerkar2026 2 роки тому

    Great Work Bro

  • @danielniels22
    @danielniels22 3 роки тому +1

    Can you recommend some references (videos or articles) on model that receive multiple input and also spit out (predict) multiple output? Like predict unit sales, how many customers, and such things.

  • @roselinekolony2470
    @roselinekolony2470 Рік тому

    Thank you so much, just have one question why are you using the relu activation function and not the sigmoid or the tanh?

  • @MaataKaBhakt
    @MaataKaBhakt 2 місяці тому

    Awesome content 😊

  • @rainbowdu509
    @rainbowdu509 2 роки тому

    Very good explanation, thanks

  • @adhvaithstudio6412
    @adhvaithstudio6412 3 роки тому +1

    if you could have explained why you have taken as 100 neurons as input..i mean any logic behind of 100 only....please reply it.

  • @NamCasmTrades
    @NamCasmTrades Місяць тому

    Can it be used for stock price prediction? What is the accuracy

  • @deepakraj-xp9tc
    @deepakraj-xp9tc 3 роки тому

    in this RNN code how we can future forecast...for example if i want to forecast for year 2020-2030 and i have data set of past 20 years..
    how we can do it??

  • @munmaheshyadav9308
    @munmaheshyadav9308 2 роки тому

    thank you so much.this is very help full video

  • @sendrapyansyah2993
    @sendrapyansyah2993 2 роки тому

    Whicj video that show you did make a data stationery??

  • @ChocolateMilkCultLeader
    @ChocolateMilkCultLeader 3 роки тому

    Does this forecast into the future though? How is that done?

  • @sowmiyar6505
    @sowmiyar6505 Рік тому

    Hi. I have a doubt. I exactly followed the same code but my predictions are straight pls could you help as where I had gone wrong.?

  • @baneledludlu7983
    @baneledludlu7983 9 місяців тому

    Wonderful Bro!

  • @maaleem90
    @maaleem90 2 роки тому

    Brother , in timeseriesGenerator ( ) , what does batch_size refer to, does it refer to number of columns or is it same as batch_size we apply in model. Fit() .

  • @sugamsharma5233
    @sugamsharma5233 Рік тому

    Great explanation bro.

  • @harshinisrinivasan1210
    @harshinisrinivasan1210 Рік тому +1

    Can you pls explain how to forecast for next few months

  • @Sanjukumari-z4c9h
    @Sanjukumari-z4c9h 3 місяці тому

    Superb🎉

  • @uni1357
    @uni1357 3 роки тому +1

    Thanks for the video. So let's say that i have 120 days in my training set and 20 days in my test set. What should be the n_input in this case? Thank you!

  • @thesundayjam22
    @thesundayjam22 2 роки тому +3

    Thank you for the great video! Just one question, why do we need to scale our series (if we are using only one series)?

    • @benslimanemohammed8121
      @benslimanemohammed8121 2 роки тому

      some models work better with numbers from 0 to 1, i think

    • @abhishekmazumdar2980
      @abhishekmazumdar2980 Рік тому

      The problem is not about having multiple features and single features in this case. Think of univariate time series as a multi-feature problem where the scale within the time series has a large range. Hence, as we do scaling for traditional models, we also scale it down for time series data. You can try without doing so, and you will see a very large loss value

  • @BOUCHRABENAMARA-w6e
    @BOUCHRABENAMARA-w6e 8 місяців тому

    why the predictions column does not display in my code 😭😭

  • @amjedmohammed2677
    @amjedmohammed2677 5 місяців тому

    Thanks, very good explanation

  • @FindMultiBagger
    @FindMultiBagger 3 роки тому

    why scaled_train used 2 times in TimeseriesGenerator ? please help

  • @vizdom
    @vizdom 2 роки тому

    So helpful ! brother thanks!

  • @PankajKumar-tr2ib
    @PankajKumar-tr2ib Рік тому

    How to decide the number of neurons in the input layer like you have taken 100

  • @minandach4974
    @minandach4974 Рік тому

    Hi i'm interested in deep learning . I fond this vidéo interesting but i've a l some confusions on predicting the wind speed using LSTM. Thé windowgenerator is a bit confusion on defining the parameters

  • @codeforcoders69
    @codeforcoders69 3 роки тому

    Sir , I have a data set that has a columns
    DATE , TIME , AM/PM ,DATA
    So using This i created a new columns DateAndTime
    DateAndTime (e.g 2019-07-01 00:45:00 , 2019-07-01 01:00:00, etc) one month data
    time difference is 15 minutes there is total of 2976 rows.
    I am have used ARIMA and SARIMA to predict the next month DATA , but i am getting very bad result (only a straight line )(constant value)
    Please Sir help me as soon as you can.
    Thank You

  • @oscarcentenomora
    @oscarcentenomora Рік тому

    Cool! But how we generate a IC for the forecast and test set?

  • @PayneMaximus
    @PayneMaximus 2 роки тому

    How can we use multiple time series to make a prediction?
    You said that it would involve the n_features in the TimeSeriesGenerator, and I'm wondering how that works. I want to know how to predict by training the RNN with multiple other series that follow similar patterns.

  • @MrKhalidele
    @MrKhalidele 3 місяці тому

    Please, is this prediction for one year ahead on a monthly basis or is it for one month ahead?

  • @hasithahiranrajapaksa5611
    @hasithahiranrajapaksa5611 3 роки тому

    Great explanation man.thank you very much ❤️❤️❤️

  • @shariqmeyraan2373
    @shariqmeyraan2373 3 роки тому

    How to predict the data for future dates? I mean to say after the test data..?

  • @ammarhaiderjafri9390
    @ammarhaiderjafri9390 3 роки тому

    How can I use multiple dependent and independent variables in this?

  • @YADIRIBETANCURBARRERA
    @YADIRIBETANCURBARRERA Рік тому

    Hi friend. Thank you so much for your tutorial, it's amazing. Please, help with this error: when I used the function scaler.transform I get TypeError: wrapped() missing 1 required positional argument: 'X'. I dont' khow how solved.

  • @VikasKumar-ru8zg
    @VikasKumar-ru8zg 10 місяців тому

    can we do rainfall prediction using LSTM?
    Please help if u can.

  • @khanrubayet4092
    @khanrubayet4092 3 роки тому

    It is possible to predict 30-50 years temperature prediction by using LSTM model

  • @c.nbhaskar4718
    @c.nbhaskar4718 Рік тому

    how to tune the above model by grid search cv

  • @manojrangera
    @manojrangera 3 роки тому +2

    Multivariate time series...

  • @Wissam-rk7tv
    @Wissam-rk7tv Рік тому

    thank you for this vidéo . iI have a qst , please how should we prepare our data if we have a lot of products ( we will have redondant date )

  • @jongcheulkim7284
    @jongcheulkim7284 2 роки тому

    Thank you so much. This is very help.

  • @rameshh3821
    @rameshh3821 8 місяців тому

    I have one doubt. [1,2,3] is used to predict [4]. Then [2,3,4] is used to predict [5]. In 2,3,4 shouldn't the 4 value be the actual instead of predicted? Why are we appending predicted value. Pls explain.

  • @mzwandilemhlongo7074
    @mzwandilemhlongo7074 3 роки тому +3

    Yho! I am a new to RNN yet your Video was very informative. I enjoyed your approach and how simplified you made it look.
    When you get a chance, Could you please do Multivariate Forecasting. Thank you.

  • @vivektiwari5535
    @vivektiwari5535 3 роки тому

    actually i am trying to forecast GW level with precipitation and temperature as input with RF model and i have precipitation and temperature upto 2050 how can i predict all data at once?

  • @kyleevalencia1827
    @kyleevalencia1827 2 роки тому

    If I have daily data can I forecast the tomorrow outcome ?

  • @donjoseph5980
    @donjoseph5980 Рік тому

    can any one give the code for forcasting.i dont know how to forcast the the future values

  • @wuzzyjang5133
    @wuzzyjang5133 3 роки тому

    One quick question, I saw you remove the seasonality but you still used the original df in the model training. So can I understand that in this video you jut used the original dataset to train the RNN without removing the seasonality? TAHNKS!!

  • @ValerEvE
    @ValerEvE 4 місяці тому

    Super video, thank you,

  • @chethanholla6444
    @chethanholla6444 2 роки тому

    How to get forecasted values after building LSTM modelling