Skip to content

Ahmedishagh/Time-series-with-LSTM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

This research investigates the application of Long Short-Term Memory (LSTM) networks for weather forecasting, leveraging the capabilities of the Google Colab environment. The primary objective is to develop a robust model capable of predicting crucial weather parameters, including minimum temperature, maximum temperature, 9 am temperature, 3 pm temperature, and rainfall. The study utilizes a historical weather dataset, subjecting it to rigorous preprocessing steps such as handling missing values through forward-filling, transforming the data into a time series format using a sliding window approach with a sequence length of 30 days, and scaling numeric features using StandardScaler to ensure optimal model performance. The dataset is then divided into training and testing sets using an 80/20 split A multi-output LSTM architecture is designed and implemented using the Keras API, comprising an input layer, two LSTM layers with dropout for regularization, and five dense output layers—one for each target variable. The model is trained using the Adam optimizer with a learning rate of 0.001 and the mean squared error (MSE) loss function. Early stopping is employed as a regularization technique to prevent overfitting, halting the training process if the validation loss does not improve for 10 consecutive epochs. This research underscores the potential of LSTM networks as a powerful tool for weather prediction tasks. Furthermore, it highlights the convenience and efficiency of using Google Colab for data science projects, providing a readily accessible platform for data loading, preprocessing, model development, training, and evaluation. Future research directions include exploring hyperparameter optimization techniques to fine-tune the model's performance, incorporating additional weather-related features such as wind speed, humidity, and atmospheric pressure to enhance its predictive capabilities, and deploying the model as a web application or API to provide real-time weather forecasts for practical use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published