Spaces:
Running
Running
James McCool
commited on
Commit
·
eeb63f1
1
Parent(s):
0e59510
Update prediction inputs and enhance team data projection in app.py. Changed default values for predicted team kills and deaths. Added projected assists to team data output based on win/loss conditions, improving the analysis capabilities.
Browse files
app.py
CHANGED
@@ -42,14 +42,14 @@ with st.sidebar:
|
|
42 |
"Predicted Team Kills",
|
43 |
min_value=0,
|
44 |
max_value=100,
|
45 |
-
value=
|
46 |
)
|
47 |
|
48 |
death_prediction = st.number_input(
|
49 |
"Predicted Team Deaths",
|
50 |
min_value=0,
|
51 |
max_value=100,
|
52 |
-
value=
|
53 |
)
|
54 |
|
55 |
@st.cache_data(ttl = 60)
|
@@ -66,11 +66,13 @@ def init_team_data(team, win_loss, kill_prediction, death_prediction):
|
|
66 |
if win_loss == "Win":
|
67 |
team_data['Kill_Proj'] = team_data['wKill%'] * kill_prediction
|
68 |
team_data['Death_Proj'] = team_data['wDeath%'] * death_prediction
|
69 |
-
team_data = team_data[
|
|
|
70 |
else:
|
71 |
team_data['Kill_Proj'] = team_data['lKill%'] * kill_prediction
|
72 |
team_data['Death_Proj'] = team_data['lDeath%'] * death_prediction
|
73 |
-
team_data = team_data[
|
|
|
74 |
|
75 |
return team_data.dropna().reset_index(drop=True)
|
76 |
|
|
|
42 |
"Predicted Team Kills",
|
43 |
min_value=0,
|
44 |
max_value=100,
|
45 |
+
value=20
|
46 |
)
|
47 |
|
48 |
death_prediction = st.number_input(
|
49 |
"Predicted Team Deaths",
|
50 |
min_value=0,
|
51 |
max_value=100,
|
52 |
+
value=5
|
53 |
)
|
54 |
|
55 |
@st.cache_data(ttl = 60)
|
|
|
66 |
if win_loss == "Win":
|
67 |
team_data['Kill_Proj'] = team_data['wKill%'] * kill_prediction
|
68 |
team_data['Death_Proj'] = team_data['wDeath%'] * death_prediction
|
69 |
+
team_data['Assist_Proj'] = team_data['wAssist%'] * kill_prediction
|
70 |
+
team_data = team_data[['playername', 'teamname', 'wKill%', 'wDeath%', 'wAssist%', 'wCS', 'Kill_Proj', 'Death_Proj', 'Assist_Proj']]
|
71 |
else:
|
72 |
team_data['Kill_Proj'] = team_data['lKill%'] * kill_prediction
|
73 |
team_data['Death_Proj'] = team_data['lDeath%'] * death_prediction
|
74 |
+
team_data['Assist_Proj'] = team_data['lAssist%'] * kill_prediction
|
75 |
+
team_data = team_data[['playername', 'teamname', 'lKill%', 'lDeath%', 'lAssist%', 'lCS', 'Kill_Proj', 'Death_Proj', 'Assist_Proj']]
|
76 |
|
77 |
return team_data.dropna().reset_index(drop=True)
|
78 |
|