nick-leland commited on
Commit
0a5f1f3
·
1 Parent(s): ca842a9
Files changed (1) hide show
  1. app.py +7 -7
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
- [f'games_{i}' for i in range(1, 146) if i != 24 and i != 122 and i != 124 and i != 125 and
14
- i != 127 and i != 130 and i != 132 and i != 133 and i != 134 and i != 139 and
15
- i != 140 and i != 141 and i != 142 and i != 143 and i != 144] + \
16
- [f'winrate_{i}' for i in range(1, 146) if i != 24 and i != 122 and i != 124 and i != 125 and
17
- i != 127 and i != 130 and i != 132 and i != 133 and i != 134 and i != 139 and
18
- i != 140 and i != 141 and i != 142 and i != 143 and i != 144]
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"""