Add trained snow prediction model and documentation
Browse files- README.md +69 -3
- snow_predictor.joblib +3 -0
README.md
CHANGED
|
@@ -1,3 +1,69 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Snow Predictor Basel
|
| 3 |
+
emoji: π¨οΈ
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: white
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 3.50.2
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# π¨οΈ Snow Predictor Basel
|
| 13 |
+
|
| 14 |
+
A machine learning model that predicts snow in Basel, Switzerland **7 days in advance** using weather data.
|
| 15 |
+
|
| 16 |
+
## π― Model Performance
|
| 17 |
+
|
| 18 |
+
- **Accuracy:** 77.4%
|
| 19 |
+
- **Recall:** 84.0% (catches most snow events)
|
| 20 |
+
- **Precision:** 16.4% (prioritizes safety over false alarms)
|
| 21 |
+
- **ROC AUC:** 89.4%
|
| 22 |
+
|
| 23 |
+
## π Features
|
| 24 |
+
|
| 25 |
+
- **7-day ahead snow prediction**
|
| 26 |
+
- **22 weather features** including temperature trends, precipitation patterns, and seasonal indicators
|
| 27 |
+
- **High recall model** - designed to catch snow events rather than avoid false alarms
|
| 28 |
+
- **Trained on 25 years** of Basel weather data (2000-2025)
|
| 29 |
+
|
| 30 |
+
## π Training Data
|
| 31 |
+
|
| 32 |
+
- **Data source:** Meteostat API
|
| 33 |
+
- **Location:** Basel, Switzerland (47.5584Β° N, 7.5733Β° E)
|
| 34 |
+
- **Time period:** 2025-08-21
|
| 35 |
+
- **Data points:** 9,278 days of weather data
|
| 36 |
+
|
| 37 |
+
## π§ Usage
|
| 38 |
+
|
| 39 |
+
```python
|
| 40 |
+
import joblib
|
| 41 |
+
|
| 42 |
+
# Load the model
|
| 43 |
+
model_data = joblib.load('snow_predictor.joblib')
|
| 44 |
+
model = model_data['model']
|
| 45 |
+
scaler = model_data['scaler']
|
| 46 |
+
feature_names = model_data['feature_names']
|
| 47 |
+
|
| 48 |
+
# Make predictions
|
| 49 |
+
# (Your prediction code here)
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## ποΈ Model Architecture
|
| 53 |
+
|
| 54 |
+
- **Algorithm:** Logistic Regression
|
| 55 |
+
- **Features:** Temperature, precipitation, pressure, wind, seasonal patterns
|
| 56 |
+
- **Target:** Binary snow prediction (0 = no snow, 1 = snow)
|
| 57 |
+
- **Prediction horizon:** 7 days ahead
|
| 58 |
+
|
| 59 |
+
## π Use Case
|
| 60 |
+
|
| 61 |
+
Perfect for:
|
| 62 |
+
- **Personal planning** (weekend trips, outdoor activities)
|
| 63 |
+
- **Business operations** (logistics, event planning)
|
| 64 |
+
- **Weather enthusiasts** and researchers
|
| 65 |
+
- **Anyone planning ahead** in Basel!
|
| 66 |
+
|
| 67 |
+
## π License
|
| 68 |
+
|
| 69 |
+
MIT License - Feel free to use and modify!
|
snow_predictor.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c77d621074c256ee669cb180d1711d02ded87b582539205ae8ec63c817d017d7
|
| 3 |
+
size 3064
|