Spaces:
Sleeping
Sleeping
Update analytics/recommendation_engine.py
Browse files
analytics/recommendation_engine.py
CHANGED
|
@@ -10,13 +10,13 @@ from models.opportunity_model import estimate_plate_appearance_probability
|
|
| 10 |
def _lineup_distance_from_slot(slot: str) -> int:
|
| 11 |
s = str(slot or "").strip().lower()
|
| 12 |
|
| 13 |
-
if s in {"current", "current_batter", "now"}:
|
| 14 |
return 0
|
| 15 |
-
if s in {"on_deck", "ondeck", "on-deck"}:
|
| 16 |
return 1
|
| 17 |
-
if s in {"in_hole", "inhole", "in-hole"}:
|
| 18 |
return 2
|
| 19 |
-
if s in {"
|
| 20 |
return 3
|
| 21 |
|
| 22 |
return 0
|
|
|
|
| 10 |
def _lineup_distance_from_slot(slot: str) -> int:
|
| 11 |
s = str(slot or "").strip().lower()
|
| 12 |
|
| 13 |
+
if s in {"current", "current batter", "current_batter", "now"}:
|
| 14 |
return 0
|
| 15 |
+
if s in {"on deck", "on_deck", "ondeck", "on-deck"}:
|
| 16 |
return 1
|
| 17 |
+
if s in {"in hole", "in_hole", "inhole", "in-hole"}:
|
| 18 |
return 2
|
| 19 |
+
if s in {"3 away", "three away", "3_away", "three_away", "three-away", "3-away"}:
|
| 20 |
return 3
|
| 21 |
|
| 22 |
return 0
|