This project focuses on predicting whether it will rain tomorrow in Australia based on historical weather data using supervised machine learning models. The goal is to support decision-making for agriculture, logistics, and weather-dependent activities.
- Source: Australian Government Bureau of Meteorology
- Kaggle Link: Weather Dataset - Rattle Package
- Duration: 2008 to 2017
- Locations: Multiple Australian weather stations
- Target Variable:
RainTomorrowβ whether it will rain the next day (YesorNo)
Dateβ used to extract SeasonTemperature,Rainfall,Wind,Humidity,Pressureβ various weather measurementsRainToday,RainTomorrowβ binary indicators for rain
- Handled missing values using SimpleImputer for both numerical and categorical data.
- Encoded categorical features using OrdinalEncoder.
- Extracted a new feature: Season from the
Datecolumn. - Used ColumnTransformer for unified preprocessing of numerical and categorical columns.
Two classification pipelines were built using:
- Random Forest Classifier
- XGBoost Classifier
Each model was wrapped in a Pipeline with preprocessing steps.
- Accuracy
- Precision
- Recall
- F1 Score
- Confusion Matrix
| Model | Accuracy | Precision | F1 Score |
|---|---|---|---|
| Random Forest | 86% | Moderate | Moderate |
| XGBoost | 87% | β High | β High |
π Best Model: XGBoost Classifier with 87% accuracy and solid precision/F1-score.
- Correlation Heatmap for feature analysis
- Confusion Matrix
- Seasonal Rain Distribution
- Bar plots for categorical feature impact