Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
---
|
| 2 |
title: BikeSharingDemand
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
app_port: 8501
|
| 8 |
tags:
|
|
@@ -12,9 +12,32 @@ short_description: App that predicts hourly bike rental demand using XGBoost
|
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: BikeSharingDemand
|
| 3 |
+
emoji: 🚲
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: docker
|
| 7 |
app_port: 8501
|
| 8 |
tags:
|
|
|
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# Bike Sharing Demand Forecast (XGBoost)
|
| 16 |
|
| 17 |
+
This Streamlit app predicts hourly bike rental demand (`count`) using an XGBoost regression model.
|
| 18 |
|
| 19 |
+
## What this app does
|
| 20 |
+
- Takes weather + time features as input
|
| 21 |
+
- Performs feature engineering from `datetime` (hour, weekday, month, year)
|
| 22 |
+
- Creates extra binary features: `frequently`, `weekend`, `windy`, `best_temp`
|
| 23 |
+
- Predicts demand using a trained **XGBoostRegressor**
|
| 24 |
+
- Converts predictions back from log-scale (`expm1`)
|
| 25 |
+
- Clips to non-negative and rounds to integer
|
| 26 |
+
|
| 27 |
+
## Files in this repo
|
| 28 |
+
- `app.py` → Streamlit application
|
| 29 |
+
- `xgb_model.pkl` → trained model (required)
|
| 30 |
+
- `requirements.txt` → Python dependencies
|
| 31 |
+
|
| 32 |
+
## Input format for batch predictions
|
| 33 |
+
Upload a CSV with these columns:
|
| 34 |
+
|
| 35 |
+
`datetime, season, holiday, workingday, weather, temp, atemp, humidity, windspeed`
|
| 36 |
+
|
| 37 |
+
Example datetime format:
|
| 38 |
+
- `2011-01-20 00:00:00`
|
| 39 |
+
|
| 40 |
+
## How to run locally
|
| 41 |
+
```bash
|
| 42 |
+
pip install -r requirements.txt
|
| 43 |
+
streamlit run app.py
|