https://github.com/theanujsinha01/rainfall-prediction-using-machine-learning
This project predicts whether it will rain or not based on weather features like pressure, humidity, dew point, cloud cover, sunshine, wind direction, and wind speed. We use a Random Forest Classifier, a popular ML algorithm, trained on historical weather data. The model learns patterns and helps us forecast rain chances.
https://github.com/theanujsinha01/rainfall-prediction-using-machine-learning
classification data-analysis eda machine-learning-algorithms matplotlib numpy pandas python scikit-learn seaborn supervised-learning
Last synced: 7 months ago
JSON representation
This project predicts whether it will rain or not based on weather features like pressure, humidity, dew point, cloud cover, sunshine, wind direction, and wind speed. We use a Random Forest Classifier, a popular ML algorithm, trained on historical weather data. The model learns patterns and helps us forecast rain chances.
- Host: GitHub
- URL: https://github.com/theanujsinha01/rainfall-prediction-using-machine-learning
- Owner: theanujsinha01
- Created: 2025-06-27T07:30:43.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-06-27T07:39:46.000Z (7 months ago)
- Last Synced: 2025-06-27T08:35:08.387Z (7 months ago)
- Topics: classification, data-analysis, eda, machine-learning-algorithms, matplotlib, numpy, pandas, python, scikit-learn, seaborn, supervised-learning
- Language: Jupyter Notebook
- Homepage: https://rainfall-prediction-using-machine-learning.streamlit.app/
- Size: 370 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rainfall-Prediction-Using-Machine-Learning
This project predicts whether it will rain or not based on weather features like pressure, humidity, dew point, cloud cover, sunshine, wind direction, and wind speed. We use a Random Forest Classifier, a popular ML algorithm, trained on historical weather data. The model learns patterns and helps us forecast rain chances.
This project is a **web-based application** that predicts whether it will rain today based on real-world weather input features like pressure, humidity, cloud cover, sunshine, etc. It uses a **Random Forest Classifier** trained on historical weather data and is deployed as an interactive **Streamlit app**.
---
## Live : https://rainfall-prediction-using-machine-learning.streamlit.app/
## ๐ Problem Statement
Predicting rainfall is crucial in weather forecasting. It helps:
- Farmers plan irrigation and harvesting.
- People manage daily travel plans.
- Cities prepare for flood alerts or water conservation.
Traditional methods require large infrastructure, but machine learning can make accurate predictions from past weather patterns.
---
## ๐ฏ Objective
To build a machine learning model that:
- Takes weather features as input.
- Predicts whether it will rain or not.
- Provides results through a simple and user-friendly web app.
---
## ๐ Features of the App
โ
Predicts Rain or No Rain
โ
Easy-to-use UI built with **Streamlit**
โ
Takes 7 weather parameters as input
โ
Displays prediction with icons: โ๏ธ / ๐ง๏ธ
โ
Trained using **Random Forest Classifier**
โ
Model saved and loaded using **joblib**
---
## ๐งช Input Features Used for Prediction
| Feature | Description |
|----------------|-------------------------------|
| `pressure` | Atmospheric pressure (hPa) |
| `dewpoint` | Dew point temperature (ยฐC) |
| `humidity` | Relative humidity (%) |
| `cloud` | Cloud cover (%) |
| `sunshine` | Sunshine duration (hours) |
| `winddirection` | Wind direction in degrees (ยฐ) |
| `windspeed` | Wind speed in km/h |
---
## ๐ง Machine Learning Model
- **Algorithm Used**: `RandomForestClassifier` (from Scikit-learn)
- **Model Training Steps**:
- Data Preprocessing
- Train-Test Split
- Feature Selection
- Model Tuning with GridSearchCV
- **Evaluation Metrics**:
- Accuracy
- Confusion Matrix
- Classification Report
- **Model Deployment**:
- Saved as `.pkl` file using `joblib`
- Loaded into the Streamlit app for prediction
---
## ๐ ๏ธ Tech Stack
| Tool/Library | Purpose |
|----------------|-------------------------------|
| Python | Programming Language |
| Pandas & NumPy | Data handling and processing |
| Scikit-learn | Machine Learning model |
| Matplotlib & Seaborn | Data Visualization |
| Joblib | Model saving/loading |
| Streamlit | Web App frontend |
---