Тёмный

Time Series Forecasting with XGBoost - Use python and machine learning to predict energy consumption 

Rob Mulla
Подписаться 172 тыс.
Просмотров 383 тыс.
50% 1

In this video tutorial we walk through a time series forecasting example in python using a machine learning model XGBoost to predict energy consumption with python. We walk through this project in a kaggle notebook (linke below) that you can copy and explore while watching.
Notebook used in this video: www.kaggle.com/code/robikscub...
Timeline:
00:00 Intro
03:15 Data prep
08:24 Feature creation
12:05 Model
15:35 Feature Importance
17:33 Forecast
Follow me on twitch for live coding streams: / medallionstallion_
My other videos:
Speed Up Your Pandas Code: • Make Your Pandas Code ...
Speed up Pandas Code: • Make Your Pandas Code ...
Intro to Pandas video: • A Gentle Introduction ...
Exploratory Data Analysis Video: • Exploratory Data Analy...
Working with Audio data in Python: • Audio Data Processing ...
Efficient Pandas Dataframes: • Speed Up Your Pandas D...
* RU-vid: youtube.com/@robmulla?sub_con...
* Discord: / discord
* Twitch: / medallionstallion_
* Twitter: / rob_mulla
* Kaggle: www.kaggle.com/robikscube
#xgboost #python #machinelearning

Опубликовано:

 

30 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 410   
@casperj4784
@casperj4784 2 года назад
A comprehensive yet succinct tutorial. And, having only just finished my Data Science degree, I found it very reassuring to see that you do get faster and more proficient with time.
@robmulla
@robmulla 2 года назад
I absolutely love messages like this. Glad to hear you found this helpful and it gave you the reassurment that things get faster. I can tell you that they do! The goal of my channel is to "spark curiosity in data science" I hope this video did that for you.
@RaviKumar-uf3eo
@RaviKumar-uf3eo Год назад
Yes. It is very reassuring, but most probably he would have kept all the things ready.
@amirghorbani7922
@amirghorbani7922 6 месяцев назад
It is better to use icdst Ai predict lstm model.
@karishmakapoor4285
@karishmakapoor4285 Год назад
Amazing flow, comprehensive yet smooth. Detailed yet generic. I love the way you think and your float across the entire process. I did this project myself and thoroughly enjoyed it. Cant wait to apply this to other datasets. A Big thumps up👍
@naderbazyari2
@naderbazyari2 3 месяца назад
Second time watching this and doing every step on my notebook as Rob goes through the task. I am still blown away by the intricacy of his approach and how he investigates the case. fascinating how he makes it look effortless. Many thanks
@sevenaac4783
@sevenaac4783 2 месяца назад
Thank you for teaching me. It allows me to understand the time series XGBoost in the shortest time.
@flel2514
@flel2514 Год назад
Hi Rob, I am a fresh data science graduate, and I find this tutorial very well done and very helpful for those that approach TS for the first time as well as for those that want to refresh the topic
@jelc
@jelc Год назад
Really well focused and clearly explained. Love your work!
@robmulla
@robmulla Год назад
I appreciate the feedback Julian
@musicplace9205
@musicplace9205 5 месяцев назад
Thanks! one of the best video I've ever seen. Simple, clear and overall why each concept is used for.
@luismisanmartin98
@luismisanmartin98 Месяц назад
As someone just getting introduced to time series analysis, this video was gold, thank you for making it!
@ADaBaker95
@ADaBaker95 8 месяцев назад
Best video on the subject I've found so far!
@Singularitarian
@Singularitarian Год назад
Very illuminating! Learned a whole lot in just 23 minutes.
@rodolfoviegas8504
@rodolfoviegas8504 Год назад
Amazing. We've learnt time series prediction only by statistical methods and/or making ML models to act like ARIMA - making lags for feed them. This approuch very interesting and intuitive. Thanks, Rob
@fudgenuggets405
@fudgenuggets405 Год назад
I like this dude's videos. They are informative and to the point.
@troy_neilson
@troy_neilson Год назад
Informative and well-structured. Thanks!
@beckynevin1
@beckynevin1 4 месяца назад
Wow! I'm trying to get up to speed on XGBoost, so I clicked on this video. There are a lot of meh data science tutorials out there, so it was such a treat to come across this one after slogging through youtube. I immediately subscribed and am headed to your channel to watch more videos on time series prediction!
@hussamcheema
@hussamcheema Год назад
I love your content. Liked the video before watching it because I know this is gonna be a great tutorial. Thanks for making these tutorials. 😊
@robmulla
@robmulla Год назад
Thanks! Glad you find it helpful.
@22niloc
@22niloc 10 месяцев назад
I'm getting to know Time Series and your vid has loads of great starter points.
@MilChamp1
@MilChamp1 2 года назад
This was a very nice introduction to this topic. You might consider turning this into a miniseries, since it's such a large topic; the next video might be on how to create the best cross-validation splits for timeseries
@robmulla
@robmulla 2 года назад
Thanks so much. There is so much to cover with time series. I may consider a miniseries that’s a great idea. I’d like to make one on prophet which is a great package for time series forecasting too.
@sandyattcl
@sandyattcl Год назад
what an amazing tutorial! I just had to give a thumbs up even before finishing the video.
@robmulla
@robmulla Год назад
Really appreciate that Sandeep. Please share the link with anyone else you think might also like it.
@69nukeee
@69nukeee 8 месяцев назад
Such an amazing video, thank you Rob and keep 'em coming! ;)
@JacksonWelch
@JacksonWelch 2 года назад
Love these videos. As a data engineer I love seeing other peoples workflows. Thanks so much for posting.
@robmulla
@robmulla 2 года назад
Glad you liked it. Thanks for watching Jackson.
@egermani
@egermani 2 года назад
Great content! Thanks a lot for the explanations, they are a great incentive to dive deeper into the subject.
@robmulla
@robmulla 2 года назад
Glad you think so! My hope is that by making short videos that explain a topic at a high level like this will spark curiosity in people so they will dive deeper into the topic, just like you said.
@TrueTalenta
@TrueTalenta 10 месяцев назад
I am new to time series and this by far is very informative and quit succinct!
@inovosystemssoftwarecompan6724
@inovosystemssoftwarecompan6724 5 месяцев назад
short and potent, great fluid presentation !!
@a.h.s.3006
@a.h.s.3006 Год назад
I worked with time series before, and this tutorial is very thorough and well made. Additional features you could think about are lag/window features, where you basically try to let the model cheat from the previous consumption, by giving it a statistical grouping of previous values, let's say the mean of consumption within a window of 8 hours, or by outright giving the previous value (lag), let's say the actual consumption 24 hours ago. This will greatly improve performance, because it helps the model to go follow the expected trend.
@robmulla
@robmulla Год назад
Thanks for the comment! Glad you enjoyed the video even though you already have experience with time series. You are 100% correct about the lag features. Check out part 2 where I go over this and a few other topics in detail.
@PRATEEK30111989
@PRATEEK30111989 5 месяцев назад
I have never seen a better data science video. You are a savant at this
@nirbhay_raghav
@nirbhay_raghav Год назад
Hands down, the bestest (if that is a word) video on the entire internet about implementation. No fancy stuff. Not too beginner and toy examples. Hust the right thing what a budding data scientist needs to see. And it is definitely reassuring to see that one can really get better and faster at doing these after a while. It takes me a lot of time reach what you have done in under 30min. Debugging things take a lot of time.
@robmulla
@robmulla Год назад
I really apprecaite your positive feedback! Glad to hear you find it encouraging that eventually things will get faster.
@lolmatt9
@lolmatt9 5 месяцев назад
Very well explained and useful. Thank you!
@michaelmebratu2921
@michaelmebratu2921 Год назад
What a quality tutorial! Thank you so much
@robmulla
@robmulla Год назад
Glad you learned something new!
@peralser
@peralser Год назад
Great Video ROB, Thanks for sharing with us!!
@robmulla
@robmulla Год назад
Thanks for watching!
@NotesandPens-ro9wx
@NotesandPens-ro9wx 6 месяцев назад
Man I am seeing this after an year and your teaching style is just hell .. now sub done and will follow you on other things :) for sure
@zhuoningli
@zhuoningli Год назад
Hi Rob! Your tutorials help me get a job offer! When I was searching for a job, I received a take-home technical exercise about time series forecasting. I watched this video and finished my exercise. Finally, I got my dream job! Thank you so much!!! I really appreciate your tutorials! 🥰
@robmulla
@robmulla Год назад
Whoa, I really love hearing stories like this. That's amazing and I wish you the best in the rest of your career.
@H99x2
@H99x2 Год назад
Incredible content and explanation. You definitely have a knack for this. I subscribed for more videos like this! Thanks :)
@robmulla
@robmulla Год назад
Thanks for watching and the feedback!
@evandrogaio7003
@evandrogaio7003 Год назад
Such an excellent video. Thanks for sharing!
@robmulla
@robmulla Год назад
Glad you liked it!
@azizbekurmonov6278
@azizbekurmonov6278 Год назад
Thanks! Love your explanations.
@Arieleyo
@Arieleyo Год назад
Love your videos Rob!! cheers from Argentina ♥
@robmulla
@robmulla Год назад
Sending my ❤ back to Argentina. Thanks for watching!
@lamborghiniveneno8423
@lamborghiniveneno8423 Год назад
Simply awesome tutorial😀
@robmulla
@robmulla Год назад
Thanks so much!
@adityaraikwar6069
@adityaraikwar6069 10 месяцев назад
Being a sort of early intermediate data scientist myself, it's very cool watching him do all these things and the most amazing thing is how everybody's mind works differently and how proficient you become in not only coding but also in approach towards a problem. keep that up man
@paultvshow
@paultvshow 7 месяцев назад
Hey, have you landed a job in data science field?
@digitalnomad2196
@digitalnomad2196 5 месяцев назад
also curious to know, recent data science graduate here@@paultvshow
@leo.y.comprendo
@leo.y.comprendo 2 года назад
This is incredible! Instantly subscribed!! thanks for your knowldege
@robmulla
@robmulla 2 года назад
Thanks for watching!
@kvafsu225
@kvafsu225 Год назад
Great lesson on machine learning. Thank you.
@robmulla
@robmulla Год назад
Thank you for watching. Share with a friend!
@akshaymbhat9144
@akshaymbhat9144 Год назад
Thanks for the wonderful video. It's very insightful ❤️ from India . Keep inspiring and aspiring always!!
@robmulla
@robmulla Год назад
My pleasure! So happy you liked it!
@user-xr3bc4vn5t
@user-xr3bc4vn5t 8 месяцев назад
You have helped me so much with this video, you don't even know!!! Thanks so much :)
@gabrielmoreno2554
@gabrielmoreno2554 Год назад
Wow, this is exactly what I needed to learn to improve my COVID death predictor. Great job!
@robmulla
@robmulla Год назад
So glad you found this helpful. Thanks for watching!
@yosafatrogika3129
@yosafatrogika3129 Год назад
so clear explanation, thanks for sharing!
@robmulla
@robmulla Год назад
Glad it was helpful!
@yourscutely
@yourscutely Год назад
Perfectly explained, thanks a lot
@robmulla
@robmulla Год назад
You are welcome! Glad you found it helpful. Check out parts 2 and 3 and share with a friend!
@anatoliyzavdoveev4252
@anatoliyzavdoveev4252 8 месяцев назад
Fantastic video tutorial 👏👏🙏
@tatulialphaidze90
@tatulialphaidze90 Год назад
Thank you for this tutorial, definitely helped me out
@robmulla
@robmulla Год назад
Glad it helped!
@chrispumping
@chrispumping 11 месяцев назад
Very informative and easy to understand tutorial....Thanks you
@robmulla
@robmulla 11 месяцев назад
You are welcome! Thanks for watching.
@super-eth8478
@super-eth8478 Год назад
Dude your channel is a gold mine ..
@robmulla
@robmulla Год назад
Thanks so much for that feedback. Now share it with anyone you think might appreciate it too!
@super-eth8478
@super-eth8478 Год назад
@@robmulla Actually I have shared it to my friends . Cheers !
@Burnitall220
@Burnitall220 3 месяца назад
This is incredible!!
@Tonitonichoppa_o
@Tonitonichoppa_o Год назад
This is the best!! Thank you so much :D 감사합니다!!
@romanrodin5669
@romanrodin5669 Год назад
Great video! Very clear and easy for understanding! Thanks a lot for clear explanation! I've got a few questions though regarding lagging data for better prediction) will jump into next video, it seems I get an answer there) thanks again!
@robmulla
@robmulla Год назад
Glad you liked it. Yes, the next video covers it in more detail!
@demaischta1129
@demaischta1129 Год назад
This is so helpful. Thank You!!
@ademhilmibozkurt7085
@ademhilmibozkurt7085 Год назад
I love this video. Please make more. Thanks
@robmulla
@robmulla Год назад
Thanks! I apprecaite the comment. Have you seen the part 2 that I have on this topic?
@prasadjayanti
@prasadjayanti 2 месяца назад
Very good explanation.
@raasheedpakwashi2961
@raasheedpakwashi2961 Год назад
LEGEND...no other words needed
@robmulla
@robmulla Год назад
Thank you 🙏
@ramizajicek
@ramizajicek Год назад
Thank you for the great presentation
@robmulla
@robmulla Год назад
I appreciate you watching and commenting. Share with a friend!
@nguyenduyta7136
@nguyenduyta7136 Год назад
Best one I ever seen ❤thank so much.
@robmulla
@robmulla Год назад
So glad you like it. Thanks for the comment.
@blueradium4260
@blueradium4260 2 года назад
Brilliant video, thank you :)
@robmulla
@robmulla 2 года назад
Thanks for taking the time to watch.
@Dongnanjie
@Dongnanjie 5 месяцев назад
Thank you, Rob!
@lovettolaedo223
@lovettolaedo223 9 месяцев назад
I enjoyed watching this as it has given me more insight into prediction. Kindly do a video on GDP growth forecasting using machine learning. Thank you.
@gustavojuantorena
@gustavojuantorena 2 года назад
"And depending who you ask" 🤣Great video!
@robmulla
@robmulla 2 года назад
I’m glad you got the reference. I was hoping he would see and appreciate that part of the video.
@tomshaw7179
@tomshaw7179 Год назад
Thanks for this video Rob. I am quite new to data science and this was really clear. Have you done a video on optimization maybe using light GBM?
@a.a.elghawas
@a.a.elghawas Год назад
Cool video Rob!
@robmulla
@robmulla Год назад
Thanks for watching!
@lucasfescina
@lucasfescina Год назад
I love your videos
@massoudkadivar8758
@massoudkadivar8758 Год назад
Perfect job👌
@wazzadec16
@wazzadec16 Год назад
FYI for anybody who is doing this recently. The part where combing training set and test set graphic and using a dotted line has to be modified. Before: '01-01-2015' After ax.axvline(x=dt.datetime(2015,1,1) Since matplotlib now needs it in a datetime series. I guess because of changing the index to a t0_datetime format?
@shrunkhalawankhede2611
@shrunkhalawankhede2611 9 месяцев назад
from datetime import datetime ax.axvline(x=datetime(2015,1,1), color='black', ls='--')
@adityagavali3158
@adityagavali3158 Год назад
Thank for this!
@datasciencesolutions2361
@datasciencesolutions2361 Год назад
Great job sincerely!
@robmulla
@robmulla Год назад
Thanks for the feedback!
@Lnd2345
@Lnd2345 2 года назад
Great video, thanks.
@robmulla
@robmulla 2 года назад
Glad you liked it! Thanks for the feedback.
@datalyfe5386
@datalyfe5386 Год назад
Just came across your channel, awesome content!
@robmulla
@robmulla Год назад
Welcome aboard! Glad you like it.
@selenkokten1708
@selenkokten1708 Год назад
Don’t use features like year which will not have the same value in the future. It is a bad idea for prediction purposes. Instead use the difference from the minimum date to see if there is an increasing trend year by year.
@paultvshow
@paultvshow 7 месяцев назад
Please elaborate
@irshadyasseen146
@irshadyasseen146 6 месяцев назад
Can you provide an example?
@solisoma1012
@solisoma1012 5 месяцев назад
Can I have ur social media handle so I can ask you some questions
@John5ive
@John5ive 2 месяца назад
I get it. The year increments and provides no value to the model.
@warmpianist
@warmpianist Месяц назад
The difference from minimum date also won't have the same value in the future. I don't know what you mean.
@THE8SFN
@THE8SFN Год назад
great tutorial
@robmulla
@robmulla Год назад
Thx!
@ChrisHalden007
@ChrisHalden007 Год назад
Great video. Thanks
@robmulla
@robmulla Год назад
Appreciate that 🙏
@mirror1023
@mirror1023 Год назад
Amazing video
@robmulla
@robmulla Год назад
Thanks!
@liliyalopez8998
@liliyalopez8998 2 года назад
I just started studying ML and this tutorial is super helpful. I would like to see how you would use the model for forecasting future energy consumption though
@robmulla
@robmulla 2 года назад
Welcome to the wonderful world of ML Liliya! Yes, I did forget to cover that in detail but I may in a future video. It's just a simple extra step to create the future dates dataframe and run the predict and feature creation on it.
@adityaghai220
@adityaghai220 5 месяцев назад
amazing video
@haleemahabulaimon8081
@haleemahabulaimon8081 11 месяцев назад
I really appreciate it
@muhammadkashif7263
@muhammadkashif7263 Год назад
Amazing season ❤
@robmulla
@robmulla Год назад
I appreciate the feedback.
@robmulla
@robmulla Год назад
Thanks!
@revathyb1663
@revathyb1663 11 месяцев назад
Great video. How are you taking into account the sequence in information while training the xgb model? Also, what method do you suggest while I deal with multiple time series, meaning say for example I have energy consumption from multiple regions and would like to have predict for each region.
@AisyahAthifa
@AisyahAthifa 2 года назад
Nice tutorial 👍
@robmulla
@robmulla 2 года назад
Thank you 👍
@gui250493
@gui250493 Год назад
Well done!
@robmulla
@robmulla Год назад
Thank you sir!
@MeghaKorade
@MeghaKorade Год назад
Hello Rob, Great tutorial! I have a question - In eval_set you're using [(x_train, y_train), (x_test, y_test)] whereas in most data split practices I've seen validation set separated from training data (which not part of either training or testing set)? Can you please check at timestamp 14:02 ? I'm trying to implement something similar on an interesting dataset and this is a great tutorial!!
@jiyanshsonofdr.rajesh8516
@jiyanshsonofdr.rajesh8516 Год назад
Nice explanation..
@robmulla
@robmulla Год назад
Thanks for liking
@Mvobrito
@Mvobrito Год назад
Great video! If the goal was prediction only, and not inference (meaning you don't care about what's driving the energy consumption), you can the energy consumption of the previous days as feature for the model. When predicting consumption at T, you can use T-1, T-2, .. T-x. And even a moving average as feature as well.
@robmulla
@robmulla Год назад
I totally agree! It all depends on how far in the future (forecasting horizon) you are attempting to predict.
@sathvikmalgikar2842
@sathvikmalgikar2842 Год назад
sir you are legend. thank you i was banging my head with lstm model in pytrch previosly but this is way better
@robmulla
@robmulla Год назад
Glad you got something working.
@AQ-jh5fr
@AQ-jh5fr Год назад
Nice tutorial and when you said quick tutorial you sure meant it xD, I had to pause like a 100 times. but still thanks for the video
@robmulla
@robmulla Год назад
Glad you liked the video. I'd rather it be too fast than too slow :D - you can always slow down the playback speed if that helps.
@legenddairy8346
@legenddairy8346 Месяц назад
Thanks!
@user-cl1eb2hh8o
@user-cl1eb2hh8o 4 месяца назад
謝謝!
@SabahMahjabeenSarwar
@SabahMahjabeenSarwar 3 месяца назад
HI thanks for this amazing video. Do you have any video where you have done the improvements that you have mentioned ? Also any link for the code ?
@ErikaGPF
@ErikaGPF Год назад
Hi, thanks for the video! Pretty good! I have a question, wouldn't improve your model to use the actual 'PJME_MW' as input? It's a honest question, it is because I saw in other examples for timeseries forecasting that uses the metric you wanna predict as input as well. Thank you!
@robmulla
@robmulla Год назад
Great question! If you use the actual value for a future time step you would be leaking information. Check out my part 2 video where I talk about the forecasting horizon. Hope that helps!
@wells111able
@wells111able 11 месяцев назад
thanks a lot ,for a beginner
@anwarsaidan3959
@anwarsaidan3959 Месяц назад
Hi Rob, Thank you very much for this tutorial. When using XGBoost , we don't do these kinds of data prep : scaling, checking for seasonality, filtering outliers ?
@marceelrf
@marceelrf Год назад
Great!!!
@robmulla
@robmulla Год назад
Thanks!
@azizbekurmonov6278
@azizbekurmonov6278 Год назад
more time series, please
@magicdimension6073
@magicdimension6073 Год назад
Have you tried SARIMA Models for time series forecasting? I'm curious which perform better. Excelent content Rob!
@nandojau1
@nandojau1 10 месяцев назад
nice!!!!
@johannesvorfeld695
@johannesvorfeld695 23 дня назад
Thanks for the video! I have a question: where/how do you incorporate any independent variables of yoru observations. For e.g. if you are looking at sales data and you have indep variables on the products packaging type, distribution etc. I'm looking to use XG boost to find the most important factors affecting sales. Thanks!
@alghanimaa
@alghanimaa 4 месяца назад
excellent introduction, is there an example of this approach with additional exogenous feature variables?
@lzh00
@lzh00 5 месяцев назад
Very informative! I just have a question about this approach. It seems the model just does regression at each future timestep based on the independent variables, without looking at the past history. Is it possible for XGBoost to take as input a sequence of historical values and forecast the future?
@andreamonicque8663
@andreamonicque8663 10 месяцев назад
Perfect!!!!!!!
@robmulla
@robmulla 10 месяцев назад
🙌
Далее
Time Series Forecasting with XGBoost - Advanced Methods
22:02
Forecasting with the FB Prophet Model
20:42
Просмотров 73 тыс.
3M❤️ #thankyou #shorts
00:16
Просмотров 5 млн
Я нашел кто меня пранкует!
00:51
LSTM Time Series Forecasting Tutorial in Python
29:53
Просмотров 194 тыс.
Predicting Stock Prices in Python
29:14
Просмотров 525 тыс.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Long Short-Term Memory (LSTM), Clearly Explained
20:45
Просмотров 500 тыс.