I am attempting to put together a universal python code to rank players per position. I understand PFF is great but I am not paying $120 a year. If anyone would like to help or give me advice I am all ears... this is what I have for WR but AI helped me with most so it definitely could use some adjusting.
# Define player statistics (replace with actual data)
player_stats = {
"Receiving_Yards": 0, # Replace with actual value
"Receiving_TDs": 0, # Replace with actual value
"Avg_Yards_per_Reception": 0, # Replace with actual value
"Longest_Reception": 0, # Replace with actual value
"Rushing_Yards": 0, # Replace with actual value
"Rushing_TDs": 0, # Replace with actual value
"Punt_Return_Yards": 0, # Replace with actual value
"Punt_Return_TDs": 0 # Replace with actual value
# Add more statistics as needed
}
# Define maximum values for normalization
max_values = {
"Receiving_Yards": 1000, # Update with appropriate maximum value
"Receiving_TDs": 10, # Update with appropriate maximum value
"Avg_Yards_per_Reception": 20, # Update with appropriate maximum value
"Longest_Reception": 80, # Update with appropriate maximum value
"Rushing_Yards": 200, # Update with appropriate maximum value
"Rushing_TDs": 5, # Update with appropriate maximum value
"Punt_Return_Yards": 500, # Update with appropriate maximum value
"Punt_Return_TDs": 5 # Update with appropriate maximum value
# Add more maximum values as needed
}
# Define weights for each statistic
weights = {
"Receiving_Yards": 0.3, # Update with appropriate weight
"Receiving_TDs": 0.2, # Update with appropriate weight
"Avg_Yards_per_Reception": 0.1, # Update with appropriate weight
"Longest_Reception": 0.1, # Update with appropriate weight
"Rushing_Yards": 0.1, # Update with appropriate weight
"Rushing_TDs": 0.05, # Update with appropriate weight
"Punt_Return_Yards": 0.05, # Update with appropriate weight
"Punt_Return_TDs": 0.1 # Update with appropriate weight
# Add more weights as needed
}
# Function to calculate performance rating
def calculate_performance_rating(player_stats, max_values, weights):
normalized_stats = {stat: (player_stats[stat] / max_values[stat]) * 100 for stat in player_stats}
performance_rating = sum(normalized_stats[stat] * weights[stat] for stat in normalized_stats)
return performance_rating
# Calculate the performance rating
performance_rating = calculate_performance_rating(player_stats, max_values, weights)
print(f"Performance Rating: {performance_rating:.2f} out of 100")
I ran this for Ty McCullouch and got 42.29/100, Marvin Harrison Jr and got 85.05/100, and Bergen got 60.22 so it seems fair. I need help with the weights of the KPIs (Key Performance Indicators) and the max values for positions. THANKS!
Transfer Portal- Scoring Grade
Moderators: rtb, kmax, SonomaCat
-
- BobcatNation Team Captain
- Posts: 489
- Joined: Wed Jun 05, 2024 12:20 pm
-
- BobcatNation Team Captain
- Posts: 489
- Joined: Wed Jun 05, 2024 12:20 pm
Re: Transfer Portal- Scoring Grade
MSU TRANSFERS IN LAST 3 YEARS
Bolded players who were successful (in my eyes)
2023-4
In
Dylan Rollins (ol- BYU)
Alec Eckert (dt- Wash st)
Samora Ezekiel (ol- North Texas)
Rohan Jones (te- Maine)
Out
Christian Anaya (wr- Western Illinios)- Receiving-13.64 Rushing- NA
Aiden Parks (safety- Mt Tech)- no data
Garrett Coon (rb- SouthD)- Rushing-39.07 Receiving- 17.76 (2022 stats)
Kade Cutler (db- Montana)- limited data
Sebastian Valdez (dt- Washington)-
Kendric Bailey (safety-?)
Jace Fitzgerald (lb- Western)
Rush Reimer (ol- Cal)
Jacob Kettels (ol- Kennesaw St)
Omar Aigbedion (ol- Baylor)
2022-3
In
Ty McCullouch (wr- Colorado St)- Receiving-40.02 Rushing- -7.3
Blake Stilllwell (db- Navarro Juco)
Garrett Walchli (wr- Utah St)- NA
Cole Bullock (lb- Canyons Juco)
Lonyatta Alexander (wr- UW)- NA
Jon Johnson (cb- El Camino Juco)
Brenden Hall (kicker/punter- SMU)
Julius Davis (rb- Wisconsin)
Out
Eric Zambrano (db- ?)
Aaron Gerle (dt- NAU)
Isaiah Ifanse (rb- Cal)
Trey Yates (dl- MT Tech)
Blake Glessner (kicker- UCLA)
Dylan Snyder (wr- MT Tech)
Jaharie Martin (fb- Maine)
Malik Mullins (wr- ?)
Sean Austin (qb- ?)
Noah Smith (wr- ?)
2021-2
In
Dru Polidore (db- Air Force)
Sean Chambers (qb- Wyoming)- Passing-26.95 Rushing-59.72
Ravi Alston (wr- St Johns)
Omarrian Aigbedion (ol- Army)
Kaegun Williams (rb- San Diego St)
Malik Mullins (wr- Indepnedence CC)
Clevan Thomas (wr- Kentucky)
Rhedi Short (s- Arizona)
Out
Mathew McKay (qb- Elon)
Luke Pawlak (kicker- U Toledo)
Casey Bauman (qb- Augustans)
Cole Snyder (ol- Delaware)
Charles Brown (wr- Texas State)
Jaden Smith (wr- Tarleton)
TJ Session (ol- Cal)
Demarius Hosey (rb- Texas AM Commerce)
Jamahd Monroe (wr- ?)
Andrew Patterson (wr- ?)
Bolded players who were successful (in my eyes)
2023-4
In
Dylan Rollins (ol- BYU)
Alec Eckert (dt- Wash st)
Samora Ezekiel (ol- North Texas)
Rohan Jones (te- Maine)
Out
Christian Anaya (wr- Western Illinios)- Receiving-13.64 Rushing- NA
Aiden Parks (safety- Mt Tech)- no data
Garrett Coon (rb- SouthD)- Rushing-39.07 Receiving- 17.76 (2022 stats)
Kade Cutler (db- Montana)- limited data
Sebastian Valdez (dt- Washington)-
Kendric Bailey (safety-?)
Jace Fitzgerald (lb- Western)
Rush Reimer (ol- Cal)
Jacob Kettels (ol- Kennesaw St)
Omar Aigbedion (ol- Baylor)
2022-3
In
Ty McCullouch (wr- Colorado St)- Receiving-40.02 Rushing- -7.3
Blake Stilllwell (db- Navarro Juco)
Garrett Walchli (wr- Utah St)- NA
Cole Bullock (lb- Canyons Juco)
Lonyatta Alexander (wr- UW)- NA
Jon Johnson (cb- El Camino Juco)
Brenden Hall (kicker/punter- SMU)
Julius Davis (rb- Wisconsin)
Out
Eric Zambrano (db- ?)
Aaron Gerle (dt- NAU)
Isaiah Ifanse (rb- Cal)
Trey Yates (dl- MT Tech)
Blake Glessner (kicker- UCLA)
Dylan Snyder (wr- MT Tech)
Jaharie Martin (fb- Maine)
Malik Mullins (wr- ?)
Sean Austin (qb- ?)
Noah Smith (wr- ?)
2021-2
In
Dru Polidore (db- Air Force)
Sean Chambers (qb- Wyoming)- Passing-26.95 Rushing-59.72
Ravi Alston (wr- St Johns)
Omarrian Aigbedion (ol- Army)
Kaegun Williams (rb- San Diego St)
Malik Mullins (wr- Indepnedence CC)
Clevan Thomas (wr- Kentucky)
Rhedi Short (s- Arizona)
Out
Mathew McKay (qb- Elon)
Luke Pawlak (kicker- U Toledo)
Casey Bauman (qb- Augustans)
Cole Snyder (ol- Delaware)
Charles Brown (wr- Texas State)
Jaden Smith (wr- Tarleton)
TJ Session (ol- Cal)
Demarius Hosey (rb- Texas AM Commerce)
Jamahd Monroe (wr- ?)
Andrew Patterson (wr- ?)
Last edited by Monymony on Tue Jun 11, 2024 5:06 pm, edited 4 times in total.
-
- Golden Bobcat
- Posts: 21123
- Joined: Thu Oct 23, 2008 6:16 am
- Location: An endless run of moguls
Re: Transfer Portal- Scoring Grade
I’d remove punt returns and make a separate category for punt returners. Then I’d take players with multiple positions and make a multi-position ranking by adding rushing, receiving and returns. This way you’ll have best receiving receivers, best rushing receivers, etc.
It’ll be cool to see who the best rushing receivers are.
It’ll be cool to see who the best rushing receivers are.
MSU - 16 team National Champions (most recent 2024); 57 individual National Champions (most recent 2023).
toM StUber
toM StUber
- coloradocat
- Golden Bobcat
- Posts: 6048
- Joined: Sat Oct 01, 2016 8:24 pm
Re: Transfer Portal- Scoring Grade
None of your bolds showed up.
Eastwood, did not make it. Ball out! Recovered, by Montana State!! The Bobcats hold!!! The Bobcats hold!!!
-
- BobcatNation Team Captain
- Posts: 489
- Joined: Wed Jun 05, 2024 12:20 pm
Re: Transfer Portal- Scoring Grade
Believe I fixed it