Тёмный

Predict The Weather with Machine Learning: Beginner Project 

Dataquest
Подписаться 61 тыс.
Просмотров 92 тыс.
50% 1

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

 

7 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 81   
@vikasparuchuri
@vikasparuchuri Год назад
Hi everyone! You can find the code for this tutorial here - github.com/dataquestio/project-walkthroughs/tree/master/weather .
@parvathypchandran5589
@parvathypchandran5589 Месяц назад
cant open the link
@andyn6053
@andyn6053 Месяц назад
This is a good example of people not understanding anything about weather. U can never forecast more than 14 days in advance.
@matalate
@matalate Месяц назад
Great tutorial, step by step very very well explained. I really thank you!
@zuzilda
@zuzilda Год назад
That was great curriculum material in 42 minutes!
@blueradium4260
@blueradium4260 Год назад
Truly excellent tutorial - thank you so much!
@musabbinjamil
@musabbinjamil 11 месяцев назад
Great video it really helped me in my project to generate missing data
@Larry21924
@Larry21924 6 месяцев назад
This is extraordinary in every way. I recently read a similar book, and it was extraordinary in every way. "The Art of Meaningful Relationships in the 21st Century" by Leo Flint
@cevikyi
@cevikyi 8 месяцев назад
Hi! First of all thank you for this great tutorial! I have a question about train-test split while using lag/window features. When you apply lag/window features on the whole dataset and then make the split, doesn't it lead to data leakage - since you're using test data's information on train dataset? I understand that in this case, an unseen 30 days of data from test was used in train with lag features, am I wrong?
@victortungiru
@victortungiru Месяц назад
Thank you for sharing this.
@trevormachimbidza8394
@trevormachimbidza8394 11 месяцев назад
First of all, that was well explained project. However, I do have a problem with my code. Line 45 of your notebook, l am trying to run it in my notebook o am receiving the following error: Expected 2D array, got 1D array instead: array=[6.0e-02 6.2e+01 4.4e+01]. Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample. HOW CAN I FIX THIS??
@SinethPriyasiri
@SinethPriyasiri 8 месяцев назад
Thank YOU very much I am from Sri Lanka
@srithiprerana7457
@srithiprerana7457 Год назад
really very informative and helpful vedio,Vik... keep up the good work :)
@parags.62
@parags.62 Год назад
Thanks a ton! It was of great help!
@anoapenshapiro2733
@anoapenshapiro2733 2 года назад
Nice video tutorial. Can you please do something on predicting for the next day, week, month or year using time series?
@Dataquestio
@Dataquestio 2 года назад
Thanks, I'll add this to the list for potential future videos! - Vik
@firstinweather6504
@firstinweather6504 Год назад
Just noticed that at longer forecast times, a lag appears to develop in the model. Is this normal or an issue with my coding? For example, at a forecast time of 9 months instead of 1 month, the MSE is quite high. However, when I shift the predictions back 9 months it matches up much better with what actually happened.
@sohamalwekar5472
@sohamalwekar5472 Год назад
getting error while fitting the model Found array with 0 sample(s) (shape=(0, 3)) while a minimum of 1 is required by Ridge.
@RobertoMartin1
@RobertoMartin1 2 года назад
Excellent
@user-og3pj9nr7t
@user-og3pj9nr7t 10 месяцев назад
i want to predict climate based on the 3 parameters [temp max,wind speed,precepitation] for next 7 days how to get forecast of other 2 data
@user-vx8ru4cl5x
@user-vx8ru4cl5x Год назад
Key error in reg.fit(train[predictors],train["target"])
@void2829
@void2829 19 дней назад
so will this predict the weather for tommorow.
@IvanToman
@IvanToman Год назад
Thank you. There are lot of examples like this, but they are not useful. You can't reliably predict tommorow temperature by using previous days. You must assess weather patterns, for that you need all possible variables you can get for your inputs (features), like solar radiation, geopotential heights, wind directions on various levels, humidity on levels, temperature on levels, convergence, divergence, ideally surface and soil temperatures and moistures, and so on. Then you need to find which of those have impact on temperature by checking correlations, and remove all other not-useful inputs. Then you might get really somewhere...
@mortezahosseini6572
@mortezahosseini6572 Год назад
Firstly, I would like to express my sincere gratitude for the invaluable tutorial you provided. It has been incredibly helpful in our coding journey so far. However, while implementing the concepts from the tutorial, we encountered a small issue related to the following code snippet: weather["month_day_max"] = weather["month_max"] / weather["t_max"] weather["max_min"] = weather["t_max"] / weather["t_min"] Unfortunately, we noticed that some values in our dataset for t_min or t_max are zero, resulting in division by zero and subsequently producing infinite values. As a consequence, we encounter errors during the execution of our code later I would greatly appreciate your guidance on how to overcome this problem. Are there any alternative approaches or modifications we can make to the code in order to avoid these errors? Thank you once again for your time and assistance. I eagerly await your response.
@RafeuLopo
@RafeuLopo 8 месяцев назад
I know i can be a little late, but you could use np.where to add a condition to ensure that the denominator is not zero. If the denominator is zero, you can set the value as np.nan and then fill it properly later
@anthonyk9834
@anthonyk9834 8 месяцев назад
@@RafeuLopo Figured out how to check for 0 using .where(): core_weather["month_day_max"] = core_weather["month_max"] / core_weather["temp_max"].where(core_weather["temp_max"] != 0) core_weather.loc[core_weather["month_day_max"].isnull(), "month_day_max"] = core_weather["month_max"] / 0.1 core_weather["max_min"] = core_weather["temp_max"] / core_weather["temp_min"].where(core_weather["temp_min"] != 0) core_weather.loc[core_weather["max_min"].isnull(), "max_min"] = core_weather["temp_max"] / 0.1 Is dividing by 0.1 the "proper" result though?
@arewamelody
@arewamelody Год назад
I really enjoyed watching this, even though I'm new to coding stuffs but it is possible to predict weather with any machine learning techniques?
@omotolaogunsolu6879
@omotolaogunsolu6879 7 месяцев назад
Hello Thanks for this video. I.m getting an error on line 66/67 saying "TypeError: incompatible index of inserted column with frame index. Here is my line of code core_weather["monthly_avg"] = core_weather["temp_max"].groupby(core_weather.index.month).apply(lambda x: x.expanding(1).mean()) If it makes a difference, I'm running this from vscode. Everything has worked fine so far except I didnt get the plots
@tinawilliam7176
@tinawilliam7176 Год назад
hi , first thanks for this tutorial , but i've some difficulties to have the same csv as you on my notebook . In mine there's no date column , STATION NAME , ACMH etc . Is it possible for you to help me please ?
@tinawilliam7176
@tinawilliam7176 Год назад
and when i try to run my code it doesn't run and just add another cell
@leenasharma632
@leenasharma632 Год назад
When i try to create a train and test set, its showing attribute error. Function object has no attribute 'loc'. Why is that?
@mvp8298
@mvp8298 5 месяцев назад
SIr, can you update this code to find out future forecasting ?
@lakshya6909
@lakshya6909 Год назад
*PLEASE* tell in detail sir how can I use this for predicting future weather values🤕🙏
@tianyilu9574
@tianyilu9574 11 месяцев назад
Super helpful!!!!
@intec2821
@intec2821 2 года назад
Hey Dataquest ! I have a question :) ! I followed your video and it was pretty straightforward, well explained. Buuuuut, i'm trying to adapt this to a personnal case, for my studies. I took an other dataset, with 3 values ( Temperature / Humidity / Wind ), and i " randomized them. By random, i mean Temperature is always between 18 and 25, and Humidity is Temperature + 10. When i get my predictions, i'm trying to predict my Temperature, they are like all at 19.5. So when i plot, i got nearly a line. Any idea why this happens ? I tought with just a Humidity = Temperature + 10 and those kinds of relation between my values, i could actually get a decent prediction range, but it looks like i'm not understanding something. Thank you for the answer :) !
@Dataquestio
@Dataquestio 2 года назад
Machine learning models can't predict if the values are random. Tomorrow's temperature would need to be correlated with today's temperate to be able to make future predictions. I would check the correlations between what you're using to predict, and what you're trying to predict.
@jimmyjimmy5574
@jimmyjimmy5574 2 года назад
this is so dope!
@lawalmayowa5488
@lawalmayowa5488 Год назад
excellent!
@Beast_vengeance
@Beast_vengeance Год назад
guys I m a beginner, what kind of algorithm is used? is this a linear regression
@sachindhavane7171
@sachindhavane7171 Год назад
It's not prediction. It should be forecasting
@edenadam3593
@edenadam3593 29 дней назад
Post a useful comment or Keep quiet 🤫
@firstinweather6504
@firstinweather6504 2 года назад
Great video! One question I have is about how to make a forecast using this. Right now we are just able to see the models prediction for the test time frame and see how accurate it is. For example, my dataset ends 07-01-22, and so the last value predicted by the model is for June 30th. What code should I use to let the model make a forecast for 07-02?
@Dataquestio
@Dataquestio 2 года назад
So if you want to make a prediction for tomorrow, just feed in the data for today. So if the max temp today was 50, and the min temp was 40, you can feed that into the algorithm. The prediction you get will be for the next day. So if you're using data for 7-1-2022 to generate the predictions, your prediction will be for 7-2-2022.
@firstinweather6504
@firstinweather6504 2 года назад
@@Dataquestio Oh ok, that makes sense. So if I remove the line coreweather = coreweather.iloc[:-1,:].copy(), I will then get the forecast for the next day?
@lakshya6909
@lakshya6909 Год назад
@@firstinweather6504 did youu get how to make a future prediction?:( if yes then please help me out
@firstinweather6504
@firstinweather6504 Год назад
@@lakshya6909 Yes I did, train = df.loc['1950-01-01':'2000-12-01'] test = df.loc['2001-01-01':] reg.fit(train[predictors], train['target']) predictions = reg.predict(test[predictors]) To generate a prediction, you use the code above. Lmk if you have any questions.
@lakshya6909
@lakshya6909 Год назад
@@firstinweather6504 how to make a future prediction bro?
@aleksandrabracichowicz4414
@aleksandrabracichowicz4414 Год назад
Did you actually answer your question? you did create a model, but what will be the weather tomorrow?
@PavithraR-ob1vn
@PavithraR-ob1vn 3 месяца назад
What are the computer languages they used?
@amirrosli2507
@amirrosli2507 Год назад
Hi Dataquest, may I ask how to predict the future max and min temperature , examples my data from 1990 to 2021, i want to get the prediction from 2030 -2060 , how is it ya? Is there example from the video?
@Dataquestio
@Dataquestio Год назад
Hi - we'll have a new video up next week that will show how to do this.
@jaswantmoher1134
@jaswantmoher1134 2 года назад
Hey Vik, very informative video. This method of machine learning falls under which category of machine learning, like random forest of CNN etc?
@Dataquestio
@Dataquestio 2 года назад
Hi Jaswant - in this project, we're using ridge regression, a linear model. You can modify the code to use random forests, though.
@intec2821
@intec2821 2 года назад
Hi ! Sorry about this, i have an other question ! Is that normal that my MSE / mean_squared_error on the model is 20.5 ? It seems pretty high right ?
@Prakash-uv1qj
@Prakash-uv1qj Год назад
I'm also getting same 20
@anuragchaudhari9385
@anuragchaudhari9385 2 года назад
Hey, I am new to programming and Ml. Infact, this was my first project. Can anyone please tell me where I should input data for today, so as to obtain predictions for tomorrow? Basically I understood how we trained the model and all, but how do I now use it to obtain results?
@Dataquestio
@Dataquestio 2 года назад
If you feed data for today into the predict method (max temp, min temp, etc), it will return the prediction for tomorrow.
@barshapatra2750
@barshapatra2750 2 года назад
Thankyou this was really helpful where can i find the local weather dataset i am unable to download
@Dataquestio
@Dataquestio 2 года назад
The data and code are linked in the project description.
@magnogaray3641
@magnogaray3641 2 года назад
Hello Dataquest...I have a question. I want to predict 90 days of temperature and rain....Dou you have the script to predict series for many days for this models.? Regards Friend
@Dataquestio
@Dataquestio 2 года назад
Hi Magno - I don't have the code, but you can modify this code to make predictions for several days out. You just have to change the target being predicted. -Vik
@karenfernanda1393
@karenfernanda1393 2 года назад
excellent video, it's my first contact with machine learning. I have a doubt: I work with meteorological data with 10 years of data, and I would like to reconstruct the time series of the past, in about 20 years (the climatological normal), and then make the forecast for the next years. it would be possible? what would be the best approach? currently I work with hourly wind speed data in brazil. thank you. regards
@ihebbibani7122
@ihebbibani7122 2 года назад
you mean you want to "create" data in the past ? if this is the case , use GAN model
@25_FpS
@25_FpS 2 года назад
very good and informative video, but what can we do to predict the weather for next day ?
@Dataquestio
@Dataquestio 2 года назад
Hi Vikki - the video shows how to predict the weather for the next day. This is in the second half of the video, when we're training a machine learning algorithm.
@25_FpS
@25_FpS 2 года назад
@@Dataquestio thanks
@harshagowdaharshagowda3107
@harshagowdaharshagowda3107 Год назад
@@Dataquestio which video sir
@giolikesrobots
@giolikesrobots 4 месяца назад
I am getting the following error. I am not sure where it is coming from or how to fix it: ValueError: Input X contains infinity or a value too large for dtype('float64').
@sreejithjayaprakash6175
@sreejithjayaprakash6175 5 месяцев назад
sir Is INDIAN dataset availabale ??????????????
@shk5253
@shk5253 2 года назад
Auto regression?
@maririasere5132
@maririasere5132 2 года назад
Is the Data Free? I mean will the charge us for the Data .
@Dataquestio
@Dataquestio 2 года назад
Hi Mariri - downloading the data is completely free.
@divafly6624
@divafly6624 10 месяцев назад
29:00
@dcr7417
@dcr7417 2 года назад
Hi Vik, thanks for this video ! I used the dataset from JKF Airport and wanted to keep snow and snow_depth in. However, towards the end of the project when I write: error, combined = create_predictions(predictors, core_weather, reg) # I get the following error ValueError Traceback (most recent call last) /var/folders/d7/q_fznsr95_97r6lp_mx_vp640000gn/T/ipykernel_57500/1727150671.py in ----> 1 error, combined = create_predictions(predictors, core_weather, reg) ... and then... ValueError: Input contains NaN, infinity or a value too large for dtype('float64'). Any ideas how to solve this? I think I have some large numbers somewhere - everything up until this point is fine
@Dataquestio
@Dataquestio 2 года назад
You can use pd.isnan and pd.isnull to filter the dataframe and check for missing or invalid data. For very large values, you can filter to check for numbers above a certain valuem You can also use the fillna method to replace any missing data.
@ebuwaevbuoma-fike9168
@ebuwaevbuoma-fike9168 2 года назад
Did you eventually resolve this? I had the same issue. I looked for min and max values for the new predictors. max (core_weather['month_max']) min (core_weather['month_max']) max (core_weather['month_day_max']) min (core_weather['month_day_max']) max (core_weather['max_min']) #inf min (core_weather['max_min']) Then, changed the formulation of min_max from a ratio to a difference (makes more sense to me that way): core_weather["max_min"] = core_weather["temp_max"] - core_weather["temp_min"] Problem solved.
@ajumonwilson5796
@ajumonwilson5796 2 года назад
When i try to create a train and test set, its showing attribute error. Function object has no attribute 'loc'. Why is that?
@Dataquestio
@Dataquestio 2 года назад
Hi Ajumon - can you share a few lines of code before and after the error, as well as the error traceback? That will help me answer your question.
@leenasharma632
@leenasharma632 Год назад
@@Dataquestio I AM ALSO GETTING THE SAME ERROR...HOW TO REMOVE THIS..PLS SUGGEST
Далее
ВОТ ЧТО МЫ КУПИЛИ НА ALIEXPRESS
11:28
Я ж идеальный?😂
00:32
Просмотров 96 тыс.
ML Was Hard Until I Learned These 5 Secrets!
13:11
Просмотров 289 тыс.
How AI Upscaling Improves Weather Forecasts
12:25
Просмотров 26 тыс.
Using ML to predict the weather and climate risk
12:41
Unlocking the Future: How to Predict Weather with LSTM
34:40
ВОТ ЧТО МЫ КУПИЛИ НА ALIEXPRESS
11:28