Commit
·
e334d89
1
Parent(s):
8446a37
Fix: Add bed_occupancy feature for predictions
Browse files
scripts/predict_flexible.py
CHANGED
|
@@ -140,7 +140,8 @@ class FlexiblePredictor:
|
|
| 140 |
'is_weekend': (future_dates.dayofweek >= 5).astype(int),
|
| 141 |
'temperature': 20 + 5 * np.sin(2 * np.pi * future_dates.hour / 24),
|
| 142 |
'flu_season_index': ((future_dates.month >= 11) | (future_dates.month <= 2)).astype(float),
|
| 143 |
-
'air_quality_index': 60 + 20 * np.random.randn(hours)
|
|
|
|
| 144 |
})
|
| 145 |
|
| 146 |
# Add lag features from historical data (repeat last known values)
|
|
|
|
| 140 |
'is_weekend': (future_dates.dayofweek >= 5).astype(int),
|
| 141 |
'temperature': 20 + 5 * np.sin(2 * np.pi * future_dates.hour / 24),
|
| 142 |
'flu_season_index': ((future_dates.month >= 11) | (future_dates.month <= 2)).astype(float),
|
| 143 |
+
'air_quality_index': 60 + 20 * np.random.randn(hours),
|
| 144 |
+
'bed_occupancy': np.random.randint(40, 80, hours) # Simulate bed occupancy
|
| 145 |
})
|
| 146 |
|
| 147 |
# Add lag features from historical data (repeat last known values)
|