Logo Lanfrica

Nemick/ai-weather-forecasting-system

Domain:

climate

Record type:

software
Creator:
Nem
Host:
AI Weather Forecasting System uses machine learning to predict temperature, humidity, and precipitation for Nairobi, Kenya. It preprocesses historical weather data, trains a multi-output random forest model, and visualizes actual vs predicted results. # AI Weather Forecasting System 🌦️ AI Weather Forecasting System uses machine learning to predict temperature, humidity, and precipitation for Nairobi, Kenya. It preprocesses historical weather data, trains a multi-output Random Forest model, and visualizes actual vs predicted results. --- ## πŸ“ Dataset * Source: Collected from a weather monitoring service * Period: **May 14, 2024 – May 14, 2025** * File: `nairobi_weather_data.csv` --- ## πŸ” Objective Predict the following weather parameters: * Maximum Temperature (`tempmax`) * Minimum Temperature (`tempmin`) * Humidity (`humidity`) * Precipitation (`precip`) --- ## 🧠 Model & Features * **Algorithm**: Random Forest Regression with `MultiOutputRegressor` * **Language**: Python 3 * **Libraries**: `pandas`, `scikit-learn`, `matplotlib`, `numpy` * **Features Used**: * Dew Point (`dew`) * Wind Gust (`windgust`) * Wind Speed (`windspeed`) * Cloud Cover (`cloudcover`) * Solar Radiation (`solarradiation`) --- ## πŸš€ Features * Cleans and preprocesses historical weather data * Predicts multiple weather variables (tempmax, tempmin, humidity, precip) * Uses a Random Forest regressor for robust predictions * Visualizes actual vs predicted values for easy comparison --- ## πŸ“ˆ Results | Metric | tempmax | tempmin | humidity | precip | | ------------ | ------- | ------- | -------- | ------- | | **RΒ² Score** | 0.65 | 0.46 | 0.80 | -0.03 | | **RMSE** | 2.10Β°F | 2.16Β°F | 4.04% | 0.12 in | πŸ“Œ Precipitation was challenging to predict due to dataset variability. --- ## πŸ–ΌοΈ Sample Output --- ## πŸ“‚ Project Structure * `weather_forecast.py` – Main ML script (for automation) * `weather_forecast.ipynb` – Notebook version for step-by-step exploration * `nairobi_weather_data.csv` – Cleaned historical weather data * `forecast_plot.png` – Output graph of actual vs predicted results --- ## πŸ’» Requirements * Python 3.x * pandas * scikit-learn * matplotlib * numpy Install dependencies using: ```bas …