Skip to content

AbhishekTungala/ML-Weather-Forecasting-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typing SVG

Introduction:

Artificial Intelligence (AI) is playing an increasingly important role in the field of meteorology and earth science. Meteorology is the study of the Earth's atmosphere and weather, while earth science covers a broader range of disciplines, including geology, oceanography, and atmospheric science. AI techniques such as machine learning, deep learning, and neural networks are being used to analyze vast amounts of data from various sources, such as satellites, weather stations, and other sensors, to predict weather patterns and natural disasters such as hurricanes, tornadoes, and floods. This data analysis can help forecasters to make more accurate and timely predictions, which can ultimately save lives and minimize damage to property.

About Code:

This code is related to training and evaluating a Random Forest model for predicting the daily mean temperature in Jaipur, India using weather data. The necessary libraries, such as pandas, numpy, matplotlib, sklearn, and seaborn, are imported. The dataset is loaded into a pandas DataFrame, and exploratory data analysis (EDA) is performed using matplotlib and seaborn to better understand the data. The data is then preprocessed by splitting it into training and test sets and normalizing the features. The Random Forest model, built using the RandomForestRegressor from sklearn, is trained on the data, with hyperparameters like the number of trees (n_estimators) and maximum depth (max_depth) being set. The model is evaluated using various metrics, including R² score, Explained Variance Score, Mean Absolute Error (MAE), Median Absolute Error, and Mean Absolute Percentage Error (MAPE). Finally, the actual vs. predicted values of the mean temperature are visualized, and the R² score on the test set is displayed to assess the model's performance.

Data Visualization:📊📈

Training Steps Graph.

(Data Output/output(42).png)

Scatter Plot of Mean & Max Temperature.

(Data Output/output(41).png)

Temperature Over Time.

(Data Output/output(40).png)

Predicted Graph.

(Data Output/Output (pred).png)

Conclusion:

This project has the potential to greatly benefit individuals living in Jaipur, as accurate temperature predictions can help individuals prepare for extreme weather conditions, reduce energy costs by optimizing heating and cooling systems, and even assist in planning outdoor activities. Additionally, these predictions can also aid government agencies in developing and implementing strategies to mitigate the effects of extreme weather events and improve the overall well-being of the community.