Introduction
For those of us football fans, it is a source of great fun and discussion to debate how long particular players of note will “stay good” for. A gentleman like Patrick Mahomes is right at the top of his game right now. But for how many more years will he be the incredible player he is right now? Five more years? Ten more years? Barring injuries, his career ought to follow some natural progression as he ages. We know that football players tend to slowly fade off in their amazing skills as they approach their 40s, many retiring in their late 30s, but beyond that very vague understanding, it often seems to me that any more detailed predictions are based simply on speculation and conjecture. The goal of this project is to see if it’s possible to use data mining techniques on all the historical NFL player info that exists to try and make a predictive model that can better address the question of how long a particular player will “stay good” for.
This project picks up where a former one left off. It will begin with the current draft of a final project that was submitted for the course CSPB 4502 – Data Mining. The first step was finding all the appropriate data online. While none of it was available in ready-to-use downloadable data sets, the info is publically available in excellent form from present day back to 1970 on the website https://www.nfl.com/stats/player-stats/. Older NFL data stretching all does exist, but is much more spotty in quality with many more gaps of missing or corrupted data. That info is found on this website: https://www.footballdb.com/statistics/nfl/player-stats/. This second website's info stretches back long before the Super Bowl era back to 1940.
The former project scraped all the data from those two websites using an automated bot. This was quite a difficult feat (!), as the former site involves both pop-up ads and a variable-locationed "next page" button that must be clicked. The two data streams were then merged and intenseive data cleaning had to be performed. A great deal of data analysis and finally data mining occurred next, resulting in the final project submission.
In its current form, the predictive machine lets a user choose any NFL player (past or present) and examine their career. For historical past players, it lets the user choose how many year of their career to input in as training data, compares that player's career to all other players who've ever played that position, and uses the mode of those to generate a prediction. Here's an example. We'll have the machine predict the future of the Rams / Cardinals legendary quarterback Kurt Warner, given the first 6 years that he played as training data:

Now we'll have the same machine spit out its best prediction for the future of young 49ers quarterback Brock Purdy's career:

This current version of the predictive engine is lovely and is an absolute ton of fun to play with. That being said, there is some very serious room for improvement. Here are the top 10 areas that most need to be addressed:
(1) How good are the predictions? The biggest flaw of this whole project right now is that there is no way of knowing how accurate or wildly far off the predictions are! This makes the machine, ultimately, no more practical to use than a magic 8 ball. Extensive study needs to be done upon historical NFL players past to determine how close the machine's predictions are to how the actual rest of those players's careers went. This "how close" needs to be a quantitative numerical number... roughly speaking one could describe it as "What percent of the time did the machine get it right?"
(2) In order to be able to do machine learning upon the player data and come up with a meaningful evaluation of the future of their career, it become relevant to be able to take the full statistics on what a player did, in a given year, and condense those into a single letter-grade-like score describing their performance. For quarterbacks, how should numbers like their number of touchdowns and their passing yards boost their grade score for the year? How should interceptions and fumbles detract from it? For kickers, what should be more important in their grade evaluation — how many 60+ yard kicks they made? Or how accurate their extra point conversions were for the season? For each player position, how can all of these different statistics be combined into one overall grade that fairly reflects how well a player actually performed? Before any meaningful predictions about a player's future can be made, the project must first answer this fundamental question.
(3) What should be done with missing or corrupted data? The data from 2025 is spotless and precise, across all stats. The data from 1940 is nearly laughably incomplete. How can the project incorporate such varied different data streams?
(4) Right now, the predictive engine's biggest flaw is that it seems to predict almost all players to retire before they actually historically did. Football is a tough and injury-filled sport. The machine is skewed towards retirement by how many players actually do retire fairly quickly. It predicts all older players to pretty much immediately retire. It predicts running backs to retire sooner than they did. While it is accurate on spans of looking ahead by 2 or 3 seasons, it's dreadfully inaccurate at longer distances into the future. Perhaps the machine needs to first predict an approximate number of seasons it expects a given player to play for and only then predict what it thinks will happen during those seasons?
(5) Major research question — Given all the above, how can we use machine learning to make the machine more and more and more precise and accurate? Throughout the project, many complete different versions of the predictive engine will be invented and designed, each using an entirely different new kind of machine learning. Each new iteration / each rebuild will get an experimental accuracy score. Which methods will perform well? Which will end up failures? This might well be the most exciting question of the entire project!
(6) A very interesting area of speculation is pondering whether or not there will be a trade-off between accurately predicting player retirement and accurately predicting future player performance. Could one version of the prediction engine become exceptionally good at predicting when a player will retire while performing poorly at predicting how well that player continues to play? Or might the opposite occur? It certainly would be ideal, in the best of worlds, if one version of the machine took the title for most accurate at both kinds of prediction, but it is yet to be seen. Exploring the interplay between these two very different kinds of prediction will be an interesting part of evaluating the success of future versions of the machine, especially if some produce very good predictions in one category but poor predictions in the other.
(7) Major research question — When all is said and done, which version of the prediction engine will prove to be the best overall? Which one will offer the best possible accuracy that can be achieved?
(8) It seems only natural to assume that as the project progresses through the use of ever more advanced machine learning techniques, that the more advanced tools ought to outperform the simplier earlier ones. Will this prove to really be the case? Or is it possible that simplicity can sometimes prove surprisingly effective?
(9) Another question, left for the end of the project, is What should come next? Where should the project go from here? What future machine learning tools might be used in the future, and what are areas of improvement for the project yet to be explored?
(10) And lastly, once all that is done, we will have a fully functioning data minining / machine learning engine designed to answer the original question that was posed at a dinner table years ago: "For how many more years will Josh Allen play well for?" At the end of this entire project, this machine ought to be able to accurately and precisely answer that question.
The 10 Questions

