Spaces:
Sleeping
Sleeping
Commit
·
0a5f1f3
1
Parent(s):
ca842a9
WE GOIN
Browse files
app.py
CHANGED
@@ -9,13 +9,13 @@ from feature_engineering import heroes, hero_information
|
|
9 |
|
10 |
# Define expected columns
|
11 |
EXPECTED_COLUMNS = ['mmr', 'p1', 'p2', 'p3', 'p4', 'p5', 'count', 'mean', 'std', 'min', 'max', 'sum',
|
12 |
-
'total_games_played', 'total_winrate']
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
|
20 |
def prepare_single_player_data(user_id, mmr, comf_1, comf_2, comf_3, comf_4, comf_5):
|
21 |
"""Creates a DataFrame in the expected format for the model"""
|
|
|
9 |
|
10 |
# Define expected columns
|
11 |
EXPECTED_COLUMNS = ['mmr', 'p1', 'p2', 'p3', 'p4', 'p5', 'count', 'mean', 'std', 'min', 'max', 'sum',
|
12 |
+
'total_games_played', 'total_winrate']
|
13 |
+
|
14 |
+
# Add games columns
|
15 |
+
games_ids = ([i for i in range(1, 115)] + # 1-114
|
16 |
+
[119, 120, 121, 123, 126, 128, 129, 131, 135, 136, 137, 138, 145])
|
17 |
+
EXPECTED_COLUMNS.extend([f'games_{i}' for i in games_ids])
|
18 |
+
EXPECTED_COLUMNS.extend([f'winrate_{i}' for i in games_ids])
|
19 |
|
20 |
def prepare_single_player_data(user_id, mmr, comf_1, comf_2, comf_3, comf_4, comf_5):
|
21 |
"""Creates a DataFrame in the expected format for the model"""
|