REFACTOR data service
This commit is contained in:
@@ -409,7 +409,9 @@ class PredictionService:
|
||||
# Traffic-based features
|
||||
'high_traffic': int(traffic > 150) if traffic > 0 else 0,
|
||||
'low_traffic': int(traffic < 50) if traffic > 0 else 0,
|
||||
'traffic_normalized': float((traffic - 100) / 50) if traffic > 0 else 0.0,
|
||||
# Fix: Use same normalization as training (when std=0, normalized=0.0)
|
||||
# Training uses constant 100.0 values, so std=0 and normalized=0.0
|
||||
'traffic_normalized': 0.0, # Match training behavior for consistent predictions
|
||||
'traffic_squared': traffic ** 2,
|
||||
'traffic_log': float(np.log1p(traffic)),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user