ffverse / ffopportunity Goto Github PK
View Code? Open in Web Editor NEWModels for Fantasy Football Expected Points
Home Page: https://ffopportunity.ffverse.com
License: GNU General Public License v3.0
Models for Fantasy Football Expected Points
Home Page: https://ffopportunity.ffverse.com
License: GNU General Public License v3.0
for xgb model files. requires xgboost 1.6 but is sig smaller file size to download
Please select sacks in this function to calculate fantasy points with sacks.
For the ultimate cool stuff include "sack yards" ;)
Can you please add the ability to generate the xyac distribution from the model as described in https://opensourcefootball.com/posts/2020-08-30-calculating-expected-fantasy-points-for-receivers/. This would enable users to generate a distribution (range of outcomes) of expected passing and receiving fantasy points in addition to median/mean outcomes.
His numeric stats seem to be doubled and I saw some one else say same thing about Chase Claypool.
The yards_after_catch field in pbp_pass is incorrect. It is currently a decimal between 0 and 1. Based on the data dictionary, it hould be an integer equal to the difference between receiving_yards and air_yards. Reviewing the desc fields confirms this. In the weekly dataframe, the rec_air_yards and rec_yards_gained fields seem accurate, so this error seems limited to the pbp_pass.
library(tidyverse)
library(ffopportunity)
ep_load(
season = nflreadr::most_recent_season(),
type = "pbp_pass",
version = "latest"
) %>%
select(yards_after_catch, air_yards, receiving_yards, desc, game_id, play_id) %>%
head(4)
#> → <ffopportunity predictions>
#> → Generated 2024-01-15 01:41:41.296844 with ep model version "latest"
#> # A tibble: 4 × 6
#> yards_after_catch air_yards receiving_yards desc game_id play_id
#> <dbl> <dbl> <dbl> <chr> <chr> <dbl>
#> 1 0.661 6 6 (14:30) (Shotgun)… 2023_0… 77
#> 2 0.496 10 NA (13:16) (Shotgun)… 2023_0… 124
#> 3 0.563 12 12 (13:12) 14-S.Howe… 2023_0… 147
#> 4 0.484 -4
Attaching the file I pulled on the evening of 12/23/2022 from the following link.
Focusing on Tom Brady to highlight the issue, it looks like the total_fantasy_points
column is being derived from rush_fantasy_points
and is ignoring the other point scoring categories pass_*
and rec_*
Will see if I can ID the issue in the code but in the mean time I thought I'd raise the alarm in the mean time
It'd be nice to get the outputs for individual scoring options (as discussed via Discord).
Ideally connected to ffscrapr to get the leagues scoring (which may will be hard for some complex scorings requiring minus points for targets/attempts and other stuff like the analytics scoring).
Best regards,
Christian
PS: Atm I'm building a predicted_pbp based on your functions and then summarize it with my leagues points.
Quite cool package, I already love it ❤️
Pre-release:
CRAN first-release stuff:
usethis::use_cran_comments()
Title:
and Description:
@return
and @examples
Authors@R:
includes a copyright holder (role 'cph')Prepare for release:
usethis::use_version('major')
devtools::build_readme()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
Submit to CRAN:
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.