Torvaney / regista

An R package for soccer modelling
https://torvaney.github.io/regista/
GNU General Public License v3.0
85 stars 8 forks source link

broom model methods #14

Closed Torvaney closed 5 years ago

Torvaney commented 6 years ago

For easy use with broom/tidyverse.

Methods:

Torvaney commented 6 years ago

For tidy.dixoncoles, something equivalent to:

tibble(parameter = names(params),
       value     = params) %>%
  separate(c("parameter", "team"), "___")

Should be possible in base r to avoid a hefty tidyr dependency

Torvaney commented 6 years ago

broom::augment just needs to wrap cbind essentially (depending on the type of predictions desired)

Torvaney commented 5 years ago

It's occurred to me that returning a list of tibbles for all values of the type argument to predict.dixoncoles would be both a consistent API, and would clean up the required code here somewhat.

The drawback is that while this plays nicely with broom and tidy principles, it could be a pain for the casual user (for which a wide format set of predictions may be preferred).

Torvaney commented 5 years ago

Closed by https://github.com/Torvaney/regista/commit/7c160c975a88632e4677b3740dae7bf95276d0aa

(Without broom::glance but honestly I can't see what useful dixon-coles metadata I would even want in there)