Downloads · 30 days
0
adityasuyal/haldwani-Rainfall-Nowcast-Forecast
haldwani-Rainfall-Nowcast-Forecast is a tabular classification model from adityasuyal. Use it for the tabular classification task on the model card, and read the license before you ship it in a product. It is set up for sklearn. The card lists the license as mit.
A 5-model weighted ensemble for hourly rain prediction over Haldwani, Uttarakhand, India. Built on open meteorological data from Open-Meteo, the system fuses Random Forest, Extra Trees, XGBoost, CatBoost, and LightGBM…
Downloads · 30 days
0
Access
Public
Updated Sep 19, 2026
Repo size
661 MB
Likes
1
Public
Click a slice to open those files.
.pkl658 MB · 100%
From the Hugging Face model README
A 5-model weighted ensemble for hourly rain prediction over Haldwani, Uttarakhand, India.
Built on open meteorological data from Open-Meteo, the system fuses Random Forest, Extra Trees, XGBoost, CatBoost, and LightGBM into a calibrated, uncertainty-aware forecast.
├── models/
│ ├── random_forest.pkl # Scikit-learn RandomForestClassifier
│ ├── extra_trees.pkl # Scikit-learn ExtraTreesClassifier
│ ├── xgboost.pkl # XGBoost XGBClassifier
│ ├── catboost.pkl # CatBoost CatBoostClassifier
│ ├── lightgbm.pkl # LightGBM LGBMClassifier
│ ├── weighted_ensemble.pkl # Full weighted fusion model
│ ├── feature_columns.pkl # Ordered list of input features
│ ├── threshold.pkl # Classification threshold (v1)
│ ├── production_config.pkl # Per-model weights + threshold
│ ├── final_model_v2.pkl # v2 single-model checkpoint
│ ├── final_features_v2.pkl # v2 feature columns
│ └── final_threshold_v2.pkl # v2 classification threshold
├── app.py # Streamlit forecast dashboard
├── predictor.py # RainPredictor inference class
├── feature_engineering.py # Feature construction pipeline
├── weather_api.py # Open-Meteo API wrapper
├── config.py # Path configuration
├── requirements.txt # Python dependencies
└── plots/ # Diagnostic & analysis plots
| Model | Type | Library |
|---|---|---|
| Random Forest | Bagging ensemble | scikit-learn |
| Extra Trees | Bagging ensemble | scikit-learn |
| XGBoost | Gradient boosting | xgboost |
| CatBoost | Gradient boosting | catboost |
| LightGBM | Gradient boosting | lightgbm |
All five models are combined into a weighted ensemble via production_config.pkl, which stores each model's weight and the optimal classification threshold.
The ensemble computes the unweighted standard deviation across all 5 model probabilities per forecast step. High std = models disagree = high uncertainty. This is used in the app to blend AI probability with Open-Meteo's POP (Probability of Precipitation) signal.
import joblib
import pandas as pd
from predictor import RainPredictor
from weather_api import get_forecast_by_city, get_recent_observed
# Load the predictor (loads all models + config internally)
predictor = RainPredictor()
# Fetch live data from Open-Meteo
history_df = get_recent_observed("Haldwani")
forecast_df = get_forecast_by_city("Haldwani")
# Run inference
results = predictor.predict(history_df, forecast_df)
print(results[["time", "rain_probability", "prediction_label"]].head(24))
| Column | Description |
|---|---|
rain_probability | Weighted ensemble probability (0–100) |
prediction | Binary prediction: 1 = Rain, 0 = No Rain |
prediction_label | "Rain" / "No Rain" |
prob_random_forest | Per-model probability (0–100) |
prob_extra_trees | Per-model probability (0–100) |
prob_xgboost | Per-model probability (0–100) |
prob_catboost | Per-model probability (0–100) |
ensemble_std | Model disagreement / uncertainty (0–100) |
pip install -r requirements.txt
streamlit run app.py
The dashboard shows:
streamlit==1.47.1
pandas==2.3.1
numpy==2.3.2
scikit-learn
joblib==1.5.1
requests==2.32.4
plotly==6.2.0
python-dateutil==2.9.0.post0
xgboost
catboost
lightgbm
Haldwani, Uttarakhand, India
Lat: 29.2183° N, Lon: 79.5130° E
Timezone: Asia/Kolkata (IST, UTC+5:30)
Weather data sourced from Open-Meteo — free, no API key required.
Model evaluation plots are included under plots/:
Aditya Suyal
huggingface.co/adityasuyal
MIT