Forecasting Weather with Neural Prophet and Python

Поделиться
HTML-код
  • Опубликовано: 25 янв 2025

Комментарии • 145

  • @andreastgran
    @andreastgran 4 года назад +9

    My man you are such an inspiration. All the best to you!

  • @rickturbo0
    @rickturbo0 3 года назад +3

    I am a Brazilian data science student and you are helping me a lot.
    Thank you for the good work!

  • @jctech14
    @jctech14 3 года назад +15

    Great video. Great tutorial. This sort of videos are very hard to prepare, film, edit...so thank you very much for this useful content!!!

  • @AcademyOmen
    @AcademyOmen 3 года назад +3

    Oh My My I'm still here...
    You content is gold Sir

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      Awesome stuff thanks so much @Academy Omen

  • @aleksandramazurek1364
    @aleksandramazurek1364 3 года назад +2

    Why have I only discovered you now? :D where have you been all my life! Your work is amazing, thanks for sharing with the rest of us!

  • @yosaikan
    @yosaikan 4 года назад +6

    Thank you so much for all the hard work you put into these videos.

  • @林躍軒-l2w
    @林躍軒-l2w 2 года назад

    15:40 (I us google translate)I use google colab I have a problem when executed it shows "TypeError: fit() got an unexpected keyword argument 'epochs'"

  • @parakhchaudhary7453
    @parakhchaudhary7453 3 года назад +1

    Thanks a lot for this brother! Wish you the best of success in the future.

  • @deveshsingh2338
    @deveshsingh2338 2 года назад +1

    Anyone Getting this error: TypeError: fit() got an unexpected keyword argument 'epochs' ??

  • @RidingWithGerdas
    @RidingWithGerdas 3 года назад +11

    Instead of apply function, try to use list comprehension at least. It's much faster. Also to extract year, month and etc. you don't need to loop (avoid loop when can). Simply use datetime library and do something like df['year'] = df['date'].dt.year and so own for other calendar related features :)

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +4

      Solid suggestion, yeah I'm just a bit lazy most of the time and I'm comfy with apply. But everyone else, definitely listen to this advice!!

    • @tuandino6990
      @tuandino6990 2 года назад

      thanks

    • @amirghorbani7922
      @amirghorbani7922 Год назад

      For weather, use icdst Ai predict only it is designed for that.

  • @HouseofEl
    @HouseofEl 4 года назад +2

    Love your energy! Excellent explanations, too!

  • @mp3311
    @mp3311 3 года назад +1

    Can you also make a tutorial on multivariate time series predictions?

  • @rangerxd1225
    @rangerxd1225 2 года назад +1

    TypeError: fit() got an unexpected keyword argument 'epochs' . If i remove epochs from fit() then it is working . IS there any altenative way to set epochs?

    • @faiazkhan2807
      @faiazkhan2807 2 года назад

      I am also facing the same problem. Did you find the solution to the problem?

  • @maxcaughron7601
    @maxcaughron7601 2 года назад

    Great videos! Youre preparation and attention to detail really pays off! Also impressed with your communication of complicated concepts. best of luck ! Will subscribe for more!

  • @udhayaranijeeva3568
    @udhayaranijeeva3568 6 месяцев назад

    Could you please assist me in resolving this issue below?
    I'm attempting to load the neuralprophet trained model from a different device.encountering a"Error": "[WinError 5] Access is denied:'model trained directory name ' " on model.predict(df) line.
    How do I figure this out...?

  • @olenamaksymiv7754
    @olenamaksymiv7754 2 года назад +1

    thank you so much you saved my diploma, it works, now I started to understand!!!!!

  • @smilekajo
    @smilekajo 2 года назад +1

    How do you use two or more variables to predict the temperature in neural prophet? for example using "MinTemp", " MaxTemp" and "Temp9am" to predict "Temp3pm"

    • @NicholasRenotte
      @NicholasRenotte  2 года назад

      Take a look at adding lagged or leading regressors, should be in the doco

  • @reanwithkimleng
    @reanwithkimleng 21 день назад

    Hello sir, time series data when cleaning missing value it consider the lag or equal interval?? Like if year 2000 to 2020 but has missing at 2010 and 2019 if we remove this year the sequence of it will loss??
    How about outlier?? And so on??❤

  • @linkvideos.charles3563
    @linkvideos.charles3563 2 года назад

    Hi Nicholas please can you do a tutorial on the Comparison of the LSTM model in terms of RMSE and spearman correlation under different sizes of training samples

  • @aniketkushwaha1100
    @aniketkushwaha1100 3 года назад +3

    How do you find the accuracy in percentage from MAE? please help

  • @ButchCassidyAndSundanceKid
    @ButchCassidyAndSundanceKid 3 года назад +2

    This is good stuff. Well done !
    One question. What you have done is univariate, how about if I want to do multivariate prediction i.e. say if I want to predict Temp9am and Temp3pm simultaneously ? Would you say NeuralProphet is only good for cyclical data i.e. temperature, gas usage or sales figures ? Thank you Nicholas.

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Hi @Adam, just double checking you're looking to do multi time-series i.e. forecast multiple things at once? Not just adding in new variables which are factored into the forecast i.e. multivariate. Can't find anything to suggest it supports multi series natively but you could easily do this by training two models (that's how I would normally handle it in production). It's great for cyclical data! You can even tune it a ton: neuralprophet.com/hyperparameter-selection/

    • @ButchCassidyAndSundanceKid
      @ButchCassidyAndSundanceKid 3 года назад

      @@NicholasRenotte That was my initial thought too, but I thought I could shoot two birds with one stone and it might be faster if I could do it in one go especially if I want to run alot of epochs.

  • @abdullahaamir4582
    @abdullahaamir4582 2 года назад +1

    mine is giving a error when i run this command
    plt.plot(melb['Date'], melb['Temp3pm'])
    NameError Traceback (most recent call last)
    Input In [9], in ()
    ----> 1 plt.plot(melb['Date'], melb['Temp3pm'])
    NameError: name 'plt' is not defined

    • @abdullahaamir4582
      @abdullahaamir4582 2 года назад

      every time i run this command the kernel dies idk why...
      i am also using the latest version of conda and from there i am running this code on jupyter notebook

    • @abdullahaamir4582
      @abdullahaamir4582 2 года назад

      another error at epochs while training
      n = NeuralProphet()
      model = n.fit(new_column, freq='D', epochs=5000)
      error:
      TypeError Traceback (most recent call last)
      Untitled-1.ipynb Cell 10' in ()
      1 n = NeuralProphet()
      ----> 2 model = n.fit(new_column, freq='D', epochs=5000)
      TypeError: NeuralProphet.fit() got an unexpected keyword argument 'epochs'

  • @hajrawaheed9636
    @hajrawaheed9636 3 месяца назад

    If i want to find for multiple locations... i should fit the model for each location independently?

  • @nandirajuvishnu
    @nandirajuvishnu 2 года назад

    unable to initialize epochs value. dont know the actual error
    it is showing fit() got an unexpected keyword argument 'epochs' this error.please help me out

  • @Lirim_K
    @Lirim_K 3 года назад

    So... if it's just mimicking the same pattern as earlier what's the use of the timeseries analysis? I could have come up with that "prediction" with zero knowledge of timeseries.

  • @esteban.m1990
    @esteban.m1990 3 года назад +1

    Thanks for sharing mate, it was really useful! Keep it up with the good job. Subscribed!

  • @user-cx9qs3sc5x
    @user-cx9qs3sc5x 2 года назад +1

    Great video. I am getting an error.
    m.fit(df, freq='D', epochs=5000)
    TypeError: fit() got an unexpected keyword argument 'epochs'.
    Can you help me with this?

    • @travelmorocco4385
      @travelmorocco4385 2 года назад +1

      Same thing you found a solution ?

    • @fahadashrafofficial
      @fahadashrafofficial 2 года назад +1

      Just remove epochs from the perimeters and then make sure that no rows are being repeated in your data.

  • @shailavijay1
    @shailavijay1 3 года назад +2

    Amazing explanation , it's very easy to understand. Is it possible to use Neural Prophet for Multivariate time Series forecast ?. Plz share your suggestions.

  • @arkyabanerjee9700
    @arkyabanerjee9700 2 года назад

    Hey I tried the epochs method but it is showing the fit() got an unexpected key argument

  • @VikramSingh-qg3nh
    @VikramSingh-qg3nh 3 года назад +1

    First command error. Can you tell me which version to install for neuralprophet and torch. ERROR: No matching distribution found for torch=1.4.0

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      What version of Python are you using? Can you try 3.7.3?

  • @nobytes2
    @nobytes2 2 года назад

    Running into a problem where seasonality, yearly shows all years for the x values instead of one year, and weekly also shows all years just like trend. I have no idea what went wrong. Looked up documentation and still can't figure it out. I've used the exact same code you have, and same dataset. Have you ran into this issue before?

  • @jascbatalla
    @jascbatalla 2 года назад

    Hi!!
    I do not know why when training the model I get this error:
    TypeError: fit() got an unexpected keyword argument 'epochs'
    as if there is no epochs parameter!!
    can someone help m eon this one??

    • @chaimaaelhajjamy2993
      @chaimaaelhajjamy2993 2 года назад

      you found the soluion?

    • @fahadashrafofficial
      @fahadashrafofficial 2 года назад +1

      Just remove epochs from the perimeters and then make sure that no rows are being repeated in your data.

  • @NicolasMazo
    @NicolasMazo 3 года назад +2

    Thanks a lot for the video ! Do you know when we should use Fbprophet versus Neural Prophet ?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      I use them interchangably. I'll train them side-by-side and evaluate which model is performing best!

    • @diegobravoguerrero
      @diegobravoguerrero 3 года назад +1

      @@NicholasRenotte I think this is a good idea for a video. I am interested in knowing when to use which. Thanks for your videos!!

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @@diegobravoguerrero will add it to the list!

  • @Niteshkumarv
    @Niteshkumarv 3 года назад +1

    Very inspirational bro
    Can you please write the code for a specific future date like i want to forecast for 1-nov-2021

  • @miguelpereira9095
    @miguelpereira9095 Год назад

    Great video! Is it possible to update the model with new data? when working with a sliding window

  • @user___01
    @user___01 4 года назад +2

    No skipping ads here

  • @temidamilola9751
    @temidamilola9751 3 года назад +1

    Hello Nick! Thanks so much for this video but is this making use of back propagation technique?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      I believe there is still an underlying DNN (haven't checked too much into it) but it would be using back prop for training.

  • @blabean
    @blabean Год назад

    Hello Sir, thank you for nice video! I am curious that, is prophet model is interpretable in their forecasting (such as feature importance). Or can you recommend some interpretable time series forecasting model? Thanks!!

  • @shk5253
    @shk5253 2 года назад

    I want to use other features in temperature forecast, humidity, wind speed and so on..... , Do you have any example for that?

  • @mateuszklos3100
    @mateuszklos3100 Год назад

    Hello Nicholas! Great tutorial, thank you! Do you know maybe which exactly algorithm is used in this script? Is thar autoregression, linear regression etc.?

  • @jaewooko4527
    @jaewooko4527 2 года назад +1

    G'day. Thanks for nice content. I was looking for stock predictions with multiple influence factors such as FX and sector performances. Thanks

    • @NicholasRenotte
      @NicholasRenotte  2 года назад

      There's a vid on that somewhere on the channel, search for ML Trader I think.

  • @muhammadtanveerislam5998
    @muhammadtanveerislam5998 Год назад

    is it possible to add multiple variable in this model?

  • @TheSerbes
    @TheSerbes Год назад

    Can hourly seasonality be made? I have hourly data and time is very important to me.

  • @isaacgroen3692
    @isaacgroen3692 3 года назад +2

    Hey this looks really usefull! I am currently trying to forecast weather dependent systems, I would love to know about a tool as easy and complete as this one that can make use of multiple features! I've tried my hand at coding it all myself using CNN1D, Dense and LSTM layers in Tensorflow & Keras using the Sequential() API, but its a ton of work to get it to work as robustly and efficiently as what you're showing here. If you know of a similarly usable workflow for multivariate timeseries forecasting, please let me know.
    Oh and great video, you really manage to boil it down to basics while opening up alleyways for further exploration for viewers that already have some experience with this subject matter! :)

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Thanks a bunch @Xander, you can actually add future and lagging regressors as part of the library! neuralprophet.com/model/lagged-regressors/ and neuralprophet.com/model/future-regressors/

    • @isaacgroen3692
      @isaacgroen3692 3 года назад +1

      @@NicholasRenotte Wow that really improved its performance! Thanks!

  • @ashutoshtripathi5699
    @ashutoshtripathi5699 2 года назад

    Sir Why we did not split our dataset into training and testing set?

  • @soner5917
    @soner5917 2 года назад

    Awesome tutorial, very clear and understandable

  • @mdjamalahmedshohan3261
    @mdjamalahmedshohan3261 4 года назад +1

    While trying to install the neuralprophet, I am getting the following error
    ERROR: Could not find a version that satisfies the requirement torch=1.4.0 (from neuralprophet) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 1.7.1)
    ERROR: No matching distribution found for torch=1.4.0 (from neuralprophet)
    can you tell me how to solve it?

    • @MrSahalshams
      @MrSahalshams 4 года назад +1

      use python version 3.8, if you have a python 3.9 downgrade it to 3.8
      download the .whl file for torch from the pypi site. Make sure you download the version which is less than 1.7.0, 1.6.0 would do
      finally use pip to install the package using the downloaded .whl file. use command, pip3 install

    • @mdjamalahmedshohan3261
      @mdjamalahmedshohan3261 4 года назад

      @@MrSahalshams python version I am using is 3.8.5 in anaconda with a windows laptop. i have tried to to use pip3 but the following error is shown
      File "", line 1
      pip3 install
      SyntaxError: invalid syntax
      when tried with pip , this is shown
      ERROR: torch-1.6.0-cp38-none-macosx_10_9_x86_64.whl is not a supported wheel on this platform.

    • @MrSahalshams
      @MrSahalshams 4 года назад

      @@mdjamalahmedshohan3261 instead of running command on ipython notebook try opening a terminal in jupyter and try the pip3 command. If you get something like command not found or invalid syntax then pip3 is not installed on your environment. Try reinstallinh pip3. Generally while installing python 3 pip3 gets automatically installed as a dependency, i can't think of a reason why pip3 will not be already installed.

    • @mdjamalahmedshohan3261
      @mdjamalahmedshohan3261 4 года назад

      @@MrSahalshams pip3 is installed. I tried to install torch with terminal but it is showing this
      (base) C:\Users\jamal>pip3 install torch-1.6.0-cp38-none-macosx_10_9_x86_64.whl
      WARNING: Requirement 'torch-1.6.0-cp38-none-macosx_10_9_x86_64.whl' looks like a filename, but the file does not exist
      ERROR: torch-1.6.0-cp38-none-macosx_10_9_x86_64.whl is not a supported wheel on this platform.
      Now when I tried installing neuralprophet in terminal the following error is shown:
      The conflict is caused by:
      neuralprophet 0.2.7 depends on torch=1.4.0
      neuralprophet 0.2.6 depends on torch=1.4.0
      neuralprophet 0.2.5 depends on torch=1.4.0
      To fix this you could try to:
      1. loosen the range of package versions you've specified
      2. remove package versions to allow pip attempt to solve the dependency conflict

    • @mdjamalahmedshohan3261
      @mdjamalahmedshohan3261 4 года назад +2

      I was able to make it work. Thanks for your comments

  • @joshsmart9178
    @joshsmart9178 3 года назад +1

    what approach would I use in FB Prophet to forecast the revenue of 3 regions of the same company? Do I use multivariate time series modeling?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Heya @Josh, just loop through your 3 different regions and create a separate model for each. It's more multi-series than multivariate. Let me know if you need a hand.

    • @joshsmart9178
      @joshsmart9178 3 года назад

      @@NicholasRenotte I must admit, I do need some help on this. Are you saying I should create 3 different forecast models for each of the three regions?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +2

      @@joshsmart9178 correct, this is a common approach in the industry particularly when using time series models as each region is likely to have it's own seasonality and trends. A lot of clients I work with have it down to product level forecasts as well with an individual model per SKU.

  • @raghavkarthikeyan2014
    @raghavkarthikeyan2014 4 года назад +1

    Where have you learnt to code deep learning ?
    Have you self -learnt the coding implementing part?

    • @HouseofEl
      @HouseofEl 4 года назад

      I suggest you look at Kaggle to begin with. Plenty of tutorials and starting points there. :)

    • @NicholasRenotte
      @NicholasRenotte  4 года назад

      It's a huge field but I started off by reading through and going through the Tensorflow tutorials. They're super clear and tight examples! www.tensorflow.org/tutorials

  • @ahsanshabbir16
    @ahsanshabbir16 3 года назад

    Hi can you help me How we can predict for Multivariate data where we have multiple variables to predict not just one using Neural prophet
    please reply as early as possible i have a assignment till day after tomorrow Thanks

  • @Its_Jane_315
    @Its_Jane_315 2 года назад

    How can we use this model to predict temperature for multiple locations?

  • @itssaharziad8977
    @itssaharziad8977 2 года назад

    What kind of Knowledge base system is it?

  • @TheArthammond
    @TheArthammond 3 года назад +1

    How to save forecast results as csv when run with n_lags?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад +1

      If you've got the results in a data frame you can output the results using your_forecast_df.to_csv('output.csv')

  • @JXEE7
    @JXEE7 3 года назад +1

    ERROR: Cannot install neuralprophet==0.2.5, neuralprophet==0.2.6 and neuralprophet==0.2.7 because these package versions have conflicting dependencies.
    how do i solve this..

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Heya @Midnightbrand 0w, can you try installing a single version?

    • @JXEE7
      @JXEE7 3 года назад

      @@NicholasRenotte yikes how do u do that

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @@JXEE7 hmm, can you show me what command you ran when installing? Should just be !pip install neuralprophet

    • @shaunakmitra5050
      @shaunakmitra5050 3 года назад

      @@NicholasRenotte Hey I have the same problem.
      I ran this command - !pip install neuralprophet
      And it shows that error. How do I fix it?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      @@shaunakmitra5050 which error sorry? The conflicting deps one?

  • @GoMarketing-f9s
    @GoMarketing-f9s 11 месяцев назад

    its possible to use wiht monthly data?

  • @navila4436
    @navila4436 3 года назад

    I facing error kernel restarting, can you please tell how to slove this error??

  • @wernerdebarros
    @wernerdebarros 4 года назад +1

    Cool man! Can you teach how do a quiver with this files? Thanks

  • @144digital
    @144digital 3 года назад

    Hello... Please the RegLoss column that follows the MAE column after the training; what is it? Is it a measure of loss? If so, how does it differ from the SmoothL1Loss and MAE?

    • @NicholasRenotte
      @NicholasRenotte  3 года назад

      Yup, spot on. RegLoss is regularised loss (loss with an applied penalty), SmoothL1Loss is another measure of loss with an L1 penalty applied. MAE is mean absolute error!

    • @144digital
      @144digital 3 года назад

      @@NicholasRenotte thank you man

  • @yashgupte5425
    @yashgupte5425 2 года назад

    Great tutorial! I am planning to work on a time series forecasting application and would like to deploy it using IBM Watson. Is it possible to deploy the neural prophet model on IBM Watson though ?

  • @sangeethap9313
    @sangeethap9313 2 года назад

    Hi Sir! This was a great video that made my work simple. But i just want to classify next one week data from forecasted data as cloudy or Sunny or rainy like that. Can you please suggest a way to do these?

    • @jailenbailey
      @jailenbailey 2 года назад

      Idk if you found an answer, but I would create a separate column to give each type of forecast (sunny, rainy, cloudy, etc.) as a numerical value to feed to a model. Or use something like a Label Encoder. It would likely be not very accurate as opposed to doing something like predicting the amount of precipitation each year or temperature, as types of forecasting can be too inconsistent to predict, but I hope that gets you in the ballpark of what you were asking.

  • @oleksiyyeryomenko205
    @oleksiyyeryomenko205 3 года назад

    What about resampling after you dropped na?

  • @raghavkarthikeyan2014
    @raghavkarthikeyan2014 4 года назад

    Can you please tell me how to code deep learning ?
    Because there are a lot of sites,blogs and websites where we can get the mathematics behind deep learning but there is not codeing implementation to that

    • @NicholasRenotte
      @NicholasRenotte  4 года назад

      There's a lot of things you can tackle with deep learning, check this out it's a super basic implementation of deep learning with Tensorflow: ruclips.net/video/6_2hzRopPbQ/видео.html

  • @priyankaavula6190
    @priyankaavula6190 2 года назад

    What is the accuracy that you got?

  • @EnockNdunda
    @EnockNdunda Год назад

    This is a perfect content🤗

  • @SACHINKUMAR-px8kq
    @SACHINKUMAR-px8kq 2 года назад

    That's Great Sir ,Love from india

  • @abhimatgupta9693
    @abhimatgupta9693 4 года назад

    Can this model accepts more than 2 feilds as an input (i.e. can it do multivariate forcest) ?

  • @ahsanshabbir16
    @ahsanshabbir16 3 года назад

    Additive_regression is not working with Neural prophet

  • @imGhost_2612
    @imGhost_2612 Год назад

    Thanks very much brother

  • @mehmeteskandari3776
    @mehmeteskandari3776 3 года назад +1

    Thank you so much

  • @tusharnautiyal8998
    @tusharnautiyal8998 2 года назад

    Neural Prophet is worst now not able to change epochs auto set batch size and all

  • @kingsleyokoli1
    @kingsleyokoli1 Год назад

    Awesome

  • @akobartani2311
    @akobartani2311 2 года назад

    It is perfect

  • @khanra17
    @khanra17 Год назад

    Watch before uploading your volume is too low

  • @nooshinsoroor7731
    @nooshinsoroor7731 11 месяцев назад

    🙏

  • @themusicvibes2241
    @themusicvibes2241 2 месяца назад

    I'm

  • @saikatghosh90
    @saikatghosh90 Год назад

    i am getting this error just by importing the neuralprophet-
    i wrote - from neuralprophet import NeuralProphet
    error message -
    .py:11 in
    from neuralprophet import NeuralProphet
    File ~\anaconda3\lib\site-packages
    euralprophet\__init__.py:9 in
    from .forecaster import NeuralProphet # noqa: F401
    File ~\anaconda3\lib\site-packages
    euralprophet\forecaster.py:14 in
    from neuralprophet.conformal import Conformal
    File ~\anaconda3\lib\site-packages
    euralprophet\conformal.py:9 in
    from neuralprophet.plot_forecast_plotly import (
    File ~\anaconda3\lib\site-packages
    euralprophet\plot_forecast_plotly.py:6 in
    from neuralprophet.plot_model_parameters_plotly import get_dynamic_axis_range
    File ~\anaconda3\lib\site-packages
    euralprophet\plot_model_parameters_plotly.py:38 in
    register_plotly_resampler(mode="auto")
    NameError: name 'register_plotly_resampler' is not defined

  • @saulohenrique5543
    @saulohenrique5543 11 месяцев назад

    its possible to use wiht monthly data?