Skip to content

creacress/Deep-Learning-Project--RNN-for-Seattle-Weather-Prediction

Repository files navigation

🌦️ Deep Learning Project: RNN for Seattle Weather Prediction

πŸ“‘ Project Description

This project utilizes a Recurrent Neural Network (RNN) with Long Short-Term Memory (LSTM) to predict future maximum temperatures based on historical weather data from Seattle. The project includes data preprocessing, model training, hyperparameter optimization, and visualization of predictions.

πŸ“‚ Project Structure

.
β”œβ”€β”€ Dataset.py          # Data loading and preprocessing
β”œβ”€β”€ Model_RNN.py        # RNN model construction
β”œβ”€β”€ Optimize.py         # Hyperparameter optimization with Keras Tuner
β”œβ”€β”€ Train.py            # Model training script
β”œβ”€β”€ Test.py             # Model evaluation
β”œβ”€β”€ Visualisation.py    # Visualization and image saving
β”œβ”€β”€ Logger.py           # Custom logger with detailed and humorous logs
β”œβ”€β”€ Main.py             # Main script to run the project
β”œβ”€β”€ requirements.txt    # Python dependencies
β”œβ”€β”€ plots/              # Folder to save generated prediction plots
└── app.log             # Log file capturing all project logs

πŸš€ Installation

# Clone the repository
git clone https://github.com/your-repo/rnn-weather-prediction.git
cd rnn-weather-prediction

# Create a virtual environment
python -m venv env
source env/bin/activate  # On Windows: env\Scripts\activate

# Install dependencies
pip install -r requirements.txt

πŸƒ Usage

python Main.py
  • Logs will be recorded in app.log.
  • Prediction plots will be saved automatically in the plots directory.

πŸ“ˆ Output Examples

  • rnn_weather_prediction.png : Displays the predicted vs actual maximum temperatures.
  • app.log : Contains detailed logs including training progress, hyperparameter tuning, and potential errors.

βš™οΈ Dependencies

pandas==1.5.3
numpy==1.24.3
scikit-learn==1.2.2
tensorflow==2.12.0
matplotlib==3.7.1
keras-tuner==1.3.5

🧠 Optimizing the RNN Model

The project uses Keras Tuner to find the best hyperparameters for the RNN model, including:

  • LSTM units: Between 32 and 128
  • Learning rate: Choices of 0.01, 0.001, and 0.0001

πŸ”₯ Example Logs

πŸ“ INFO: Starting the application for RNN weather prediction 🌦️.
πŸ” DEBUG: Successfully loaded dataset! Size: (1461, 6).
🚨 ERROR: File not found: /mnt/data/seattle-weather.csv
🎯 INFO: Model training completed! Ready to predict the future.

πŸ™‹ Support

If you encounter any issues, please open an issue or contact me directly.


πŸ’‘ Tip: Always activate your virtual environment before running the project!

About

🌦️ Deep Learning RNN Project: Predict Seattle's Weather with LSTM 🌑️

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages