130 likes | 249 Views
Fantasy Football : NFL Score Predictor. Matt Grecco Abhishek Goyal. Project Description. We have designed a database that will take in stats for each of the NFL teams for each week. Based on the stats and the predict equation, the program will predict the outcome of any game.
E N D
Fantasy Football: NFL Score Predictor Matt Grecco Abhishek Goyal
Project Description • We have designed a database that will take in stats for each of the NFL teams for each week. • Based on the stats and the predict equation, the program will predict the outcome of any game.
Description of the solution • We used three classes to implement the database – week, team, and teamdb • The week class contains all the stats for each week • The team class contains the name, wins/losses/ties, and a vector of weeks • The teamdb class contains a vector of teams
Description of the solution • The database has an insert function through which the user can input all the stats. • There is also a display function which displays the stats for any given team. • The main part of the database is the predict function which predicts outcomes of games, giving a score for each team.
Predict function • We designed an equation that predicts the outcome of the game based on passing yards, passing yards allowed, rushing yards, rushing yards allowed, turnovers, turnovers forced, points for and points against.
Predict function • The equation for the predict function: • Find averages of all games, previous 8 games, and previous 4 games in all eight statistical categories • Average those by using: .5 * avg(4) + .3*avg(8) + .2*avg(all) • Find these for both teams
Predict Function • Average the offensive parts (rush yards, pass yards, points, turnovers) from one team with the defensive parts of the other, and vice versa. • Convert the values into scientific notation (rush yards / 100, etc), and multiply new rush yards, pass yards, points, and turnovers forced together. • Finally, multiply by 3 to get score
Getting Data • We got all the stats for each team from www.espn.com • All the stats are in the Excel file provided with the presentation. • They have also been entered in nfl.dat
Results • We tested our predict function for Week 12 and Week 13 of the current NFL season. • 11 out of 16 predictions were correct each week. • We compared our predictions to that of ESPN and Yahoo
Results • We predicted more games correctly, with a more accurate score, than both internet sites • For example: • We predicted Oakland to beat the N. Y. Jets by a score 26 to 20.5 in Week 12. • The final score of the game was 26 to 20.
Results • Another example • Comparing to ESPN • We predicted New England to beat Buffalo by a score of 30 to 18 and ESPN predicted a score of 24 to 21. • The final score of the game was 27-17.
Group Members • Both of us worked together on all parts of the program. • It took us lot of time to get stats for each team for each week and also to enter it in. • We had to spent some time to figure out the tied games too.
Improvements • We are planning to add a search function to find out statistical leaders of a particular week. • We also want to be able to display the team standings by division. • We want to figure out a way to implement the home field advantage and loss due to injuries to starting players.