Code Monkey home page Code Monkey logo

nfeloqb's Introduction

nfeloqb

About

nfeloqb is a model for valuing and predicting NFL QB performance based on 538's QB Elo model.

Since 538's model may be discontinued heading in to the 2023 season, the primary goal of this project is to recreate and maintain a CSV of weekly data in the same format as 538's original model. To start, this file will only cover the QB portion of the model. For those looking for Elo based power-rankings, the main nfelo model will likely be your best replacement.

As a secondary goal, nfeloqb will also seek to make improvements to the original 538 QB model where possible. Improvement here, means lower error in predicting 538's VALUE metric. The VALUE metric itself (which is a measure of QB performance somewhere between Passer Rating and QBR) will remain untouched.

The current improvements are as follows:

  1. Seasonal Regression -- instead of regressing QBs to a league average, nfeloqb gradually phases out league average for a rolling career average, allowing for stronger season-over-season mean reversion
  2. Initial Value -- like the original model, nfeloqb bases a QB's starting value on their draft position. However, in nfeloqb, this value decays exponentially rather than linearly and is applied as a value relative to the team's previous performance in the passing game rather than as an absolute value. This better accounts for passing performance inflation and introduces the notion that a QB's performance, especially early in their career, can be heavily influenced by surrounding talent and circumstance
  3. Defensive Adjustment -- the original 538 methodology did not specify how opposing defensive adjustments were created. In nfeloqb, a team's rolling offensive and defensive passing performance are calculated by two seperate models with their own parameters. Offensive team values are optimized to match the original model's weekly QB adjustments as closely as possible, while the defensive model is optimized to minimize error in predicting how well a QB will perform against a given defense.

In the spirit of this package's primary goal, the accompanying CSV uses 538's original model for all seasons up until 2023. From 2023 onward, it uses the improved nfeloqb model

Package Structure

For those looking to simply ingest the model output, the "qb_elos.csv" file will be updated every Tuesday and Thursday morning during the NFL season. For those looking to run the model themselves, this can be done by importing the pacakge and executing "nfeloqb.run()", which will pull all necessary data from nflfastR, calculate VALUES, determine QBs, etc. To run the model by itself for all games that have been played, use the argument "model_only=True" which will return a QBModel class instance that contains a an array of records (QBModel.data) with a record for each weekly QB performance.

nfeloqb's People

Contributors

actions-user avatar

Stargazers

 avatar blnk avatar Kao Phetchareun avatar Keegan Heilman avatar Michael Ellison avatar Eric avatar  avatar Julian Kantor avatar  avatar

Watchers

 avatar

nfeloqb's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.