Spaces:
Running
Running
James McCool
commited on
Commit
·
575b2cb
1
Parent(s):
65b3735
Enhance statistical projections in init_team_data function of app.py. Updated the calculation of Kill, Death, and Assist projections to incorporate kill and death predictions, improving the accuracy of player performance metrics during win and loss scenarios. This change enhances the depth of analysis available for team data, allowing for more informed decision-making based on projected statistics.
Browse files
app.py
CHANGED
@@ -280,15 +280,15 @@ def init_team_data(team, opponent, win_loss, kill_prediction, death_prediction,
|
|
280 |
team_data = player_tables.drop_duplicates(subset = ['playername'])
|
281 |
|
282 |
if win_loss == "Win":
|
283 |
-
team_data['Kill_Proj'] = team_data.apply(lambda row: row['wKill%'] * opp_pos_kills_boost_win.get(row['position'], 1), axis=1)
|
284 |
-
team_data['Death_Proj'] = team_data.apply(lambda row: row['wDeath%'] * opp_pos_deaths_boost_win.get(row['position'], 1), axis=1)
|
285 |
-
team_data['Assist_Proj'] = team_data.apply(lambda row: row['wAssist%'] * opp_pos_assists_boost_win.get(row['position'], 1), axis=1)
|
286 |
team_data['CS_Proj'] = team_data.apply(lambda row: row['wCS'] * opp_pos_cs_boost_win.get(row['position'], 1), axis=1)
|
287 |
team_data = team_data[['playername', 'teamname', 'position', 'Kill_Proj', 'Death_Proj', 'Assist_Proj', 'CS_Proj']]
|
288 |
else:
|
289 |
-
team_data['Kill_Proj'] = team_data.apply(lambda row: row['lKill%'] * opp_pos_kills_boost_loss.get(row['position'], 1), axis=1)
|
290 |
-
team_data['Death_Proj'] = team_data.apply(lambda row: row['lDeath%'] * opp_pos_deaths_boost_loss.get(row['position'], 1), axis=1)
|
291 |
-
team_data['Assist_Proj'] = team_data.apply(lambda row: row['lAssist%'] * opp_pos_assists_boost_loss.get(row['position'], 1), axis=1)
|
292 |
team_data['CS_Proj'] = team_data.apply(lambda row: row['lCS'] * opp_pos_cs_boost_loss.get(row['position'], 1), axis=1)
|
293 |
team_data = team_data[['playername', 'teamname', 'position', 'Kill_Proj', 'Death_Proj', 'Assist_Proj', 'CS_Proj']]
|
294 |
else:
|
|
|
280 |
team_data = player_tables.drop_duplicates(subset = ['playername'])
|
281 |
|
282 |
if win_loss == "Win":
|
283 |
+
team_data['Kill_Proj'] = team_data.apply(lambda row: row['wKill%'] * opp_pos_kills_boost_win.get(row['position'], 1), axis=1) * kill_prediction
|
284 |
+
team_data['Death_Proj'] = team_data.apply(lambda row: row['wDeath%'] * opp_pos_deaths_boost_win.get(row['position'], 1), axis=1) * death_prediction
|
285 |
+
team_data['Assist_Proj'] = team_data.apply(lambda row: row['wAssist%'] * opp_pos_assists_boost_win.get(row['position'], 1), axis=1) * kill_prediction
|
286 |
team_data['CS_Proj'] = team_data.apply(lambda row: row['wCS'] * opp_pos_cs_boost_win.get(row['position'], 1), axis=1)
|
287 |
team_data = team_data[['playername', 'teamname', 'position', 'Kill_Proj', 'Death_Proj', 'Assist_Proj', 'CS_Proj']]
|
288 |
else:
|
289 |
+
team_data['Kill_Proj'] = team_data.apply(lambda row: row['lKill%'] * opp_pos_kills_boost_loss.get(row['position'], 1), axis=1) * kill_prediction
|
290 |
+
team_data['Death_Proj'] = team_data.apply(lambda row: row['lDeath%'] * opp_pos_deaths_boost_loss.get(row['position'], 1), axis=1) * death_prediction
|
291 |
+
team_data['Assist_Proj'] = team_data.apply(lambda row: row['lAssist%'] * opp_pos_assists_boost_loss.get(row['position'], 1), axis=1) * kill_prediction
|
292 |
team_data['CS_Proj'] = team_data.apply(lambda row: row['lCS'] * opp_pos_cs_boost_loss.get(row['position'], 1), axis=1)
|
293 |
team_data = team_data[['playername', 'teamname', 'position', 'Kill_Proj', 'Death_Proj', 'Assist_Proj', 'CS_Proj']]
|
294 |
else:
|