nflverse / nflseedR

Functions to Efficiently Simulate and Evaluate NFL Seasons
https://nflseedr.com
Other
20 stars 3 forks source link

Current state and to-do #1

Closed mrcaseb closed 3 years ago

mrcaseb commented 3 years ago

I'll try to summarize what I have done and what's next. I might change this or add stuff if I forget something.

Done

To-Do

I am pretty sure I forgot stuff but that's all for now.

@leesharpe please feel free to look at what I have done, ask if something is unclear and modify if necessary.

mrcaseb commented 3 years ago

Update:

The package is installable now and we

mrcaseb commented 3 years ago

Added examples for divisions ranks and conference seeds functions. Looks good to me (I have deselcted some variables so it fits in here)

library(dplyr, warn.conflicts = FALSE)
options(digits = 3)
options(tibble.print_min = 64)
# options(tibble.width = Inf)

readRDS(url("https://github.com/leesharpe/nfldata/blob/master/data/games.rds?raw=true")) %>%
  dplyr::filter(season %in% 2019:2020) %>%
  dplyr::select(sim = season, game_type, week, away_team, home_team, result) %>%
  nflseedR::compute_division_ranks() %>%
  purrr::pluck("standings") %>% 
  dplyr::select(-sov, -sos)
#> * 2021-01-22 12:30:33: Calculating team data
#> * 2021-01-22 12:30:33: Calculating head to head
#> * 2021-01-22 12:30:33: Calculating division rank #1
#> * 2021-01-22 12:30:33: Calculating division rank #2
#> * 2021-01-22 12:30:33: Calculating division rank #3
#> * 2021-01-22 12:30:33: Calculating division rank #4
#> # A tibble: 64 x 10
#>      sim conf  division  team  games  wins win_pct div_pct conf_pct div_rank
#>    <int> <chr> <chr>     <chr> <int> <dbl>   <dbl>   <dbl>    <dbl>    <dbl>
#>  1  2019 AFC   AFC East  BUF      16  10    0.625    0.5     0.583         2
#>  2  2019 AFC   AFC East  MIA      16   5    0.312    0.333   0.333         4
#>  3  2019 AFC   AFC East  NE       16  12    0.75     0.833   0.667         1
#>  4  2019 AFC   AFC East  NYJ      16   7    0.438    0.333   0.333         3
#>  5  2019 AFC   AFC North BAL      16  14    0.875    0.833   0.833         1
#>  6  2019 AFC   AFC North CIN      16   2    0.125    0.167   0.167         4
#>  7  2019 AFC   AFC North CLE      16   6    0.375    0.5     0.5           3
#>  8  2019 AFC   AFC North PIT      16   8    0.5      0.5     0.5           2
#>  9  2019 AFC   AFC South HOU      16  10    0.625    0.667   0.667         1
#> 10  2019 AFC   AFC South IND      16   7    0.438    0.5     0.417         3
#> 11  2019 AFC   AFC South JAX      16   6    0.375    0.333   0.5           4
#> 12  2019 AFC   AFC South TEN      16   9    0.562    0.5     0.583         2
#> 13  2019 AFC   AFC West  DEN      16   7    0.438    0.5     0.5           2
#> 14  2019 AFC   AFC West  KC       16  12    0.75     1       0.75          1
#> 15  2019 AFC   AFC West  LAC      16   5    0.312    0       0.25          4
#> 16  2019 AFC   AFC West  OAK      16   7    0.438    0.5     0.417         3
#> 17  2019 NFC   NFC East  DAL      16   8    0.5      0.833   0.583         2
#> 18  2019 NFC   NFC East  NYG      16   4    0.25     0.333   0.25          3
#> 19  2019 NFC   NFC East  PHI      16   9    0.562    0.833   0.583         1
#> 20  2019 NFC   NFC East  WAS      16   3    0.188    0       0.167         4
#> 21  2019 NFC   NFC North CHI      16   8    0.5      0.667   0.583         3
#> 22  2019 NFC   NFC North DET      16   3.5  0.219    0       0.208         4
#> 23  2019 NFC   NFC North GB       16  13    0.812    1       0.833         1
#> 24  2019 NFC   NFC North MIN      16  10    0.625    0.333   0.583         2
#> 25  2019 NFC   NFC South ATL      16   7    0.438    0.667   0.5           2
#> 26  2019 NFC   NFC South CAR      16   5    0.312    0.167   0.167         4
#> 27  2019 NFC   NFC South NO       16  13    0.812    0.833   0.75          1
#> 28  2019 NFC   NFC South TB       16   7    0.438    0.333   0.417         3
#> 29  2019 NFC   NFC West  ARI      16   5.5  0.344    0.167   0.292         4
#> 30  2019 NFC   NFC West  LA       16   9    0.562    0.5     0.583         3
#> 31  2019 NFC   NFC West  SEA      16  11    0.688    0.5     0.667         2
#> 32  2019 NFC   NFC West  SF       16  13    0.812    0.833   0.833         1
#> 33  2020 AFC   AFC East  BUF      16  13    0.812    1       0.833         1
#> 34  2020 AFC   AFC East  MIA      16  10    0.625    0.5     0.583         2
#> 35  2020 AFC   AFC East  NE       16   7    0.438    0.5     0.5           3
#> 36  2020 AFC   AFC East  NYJ      16   2    0.125    0       0.0833        4
#> 37  2020 AFC   AFC North BAL      16  11    0.688    0.667   0.583         2
#> 38  2020 AFC   AFC North CIN      16   4.5  0.281    0.167   0.333         4
#> 39  2020 AFC   AFC North CLE      16  11    0.688    0.5     0.583         3
#> 40  2020 AFC   AFC North PIT      16  12    0.75     0.667   0.75          1
#> 41  2020 AFC   AFC South HOU      16   4    0.25     0.333   0.25          3
#> 42  2020 AFC   AFC South IND      16  11    0.688    0.667   0.583         2
#> 43  2020 AFC   AFC South JAX      16   1    0.0625   0.167   0.0833        4
#> 44  2020 AFC   AFC South TEN      16  11    0.688    0.833   0.667         1
#> 45  2020 AFC   AFC West  DEN      16   5    0.312    0.167   0.333         4
#> 46  2020 AFC   AFC West  KC       16  14    0.875    0.667   0.833         1
#> 47  2020 AFC   AFC West  LAC      16   7    0.438    0.5     0.5           3
#> 48  2020 AFC   AFC West  LV       16   8    0.5      0.667   0.5           2
#> 49  2020 NFC   NFC East  DAL      16   6    0.375    0.333   0.417         3
#> 50  2020 NFC   NFC East  NYG      16   6    0.375    0.667   0.417         2
#> 51  2020 NFC   NFC East  PHI      16   4.5  0.281    0.333   0.333         4
#> 52  2020 NFC   NFC East  WAS      16   7    0.438    0.667   0.417         1
#> 53  2020 NFC   NFC North CHI      16   8    0.5      0.333   0.5           2
#> 54  2020 NFC   NFC North DET      16   5    0.312    0.167   0.333         4
#> 55  2020 NFC   NFC North GB       16  13    0.812    0.833   0.833         1
#> 56  2020 NFC   NFC North MIN      16   7    0.438    0.667   0.417         3
#> 57  2020 NFC   NFC South ATL      16   4    0.25     0.167   0.167         4
#> 58  2020 NFC   NFC South CAR      16   5    0.312    0.167   0.333         3
#> 59  2020 NFC   NFC South NO       16  12    0.75     1       0.833         1
#> 60  2020 NFC   NFC South TB       16  11    0.688    0.667   0.667         2
#> 61  2020 NFC   NFC West  ARI      16   8    0.5      0.333   0.5           3
#> 62  2020 NFC   NFC West  LA       16  10    0.625    0.5     0.75          2
#> 63  2020 NFC   NFC West  SEA      16  12    0.75     0.667   0.75          1
#> 64  2020 NFC   NFC West  SF       16   6    0.375    0.5     0.333         4

readRDS(url("https://github.com/leesharpe/nfldata/blob/master/data/games.rds?raw=true")) %>%
  dplyr::filter(season %in% 2019:2020) %>%
  dplyr::select(sim = season, game_type, week, away_team, home_team, result) %>%
  nflseedR::compute_division_ranks() %>%
  nflseedR::compute_conference_seeds(h2h = .$h2h) %>% 
  dplyr::select(-conf, -sov, -sos)
#> * 2021-01-22 12:30:33: Calculating team data
#> * 2021-01-22 12:30:33: Calculating head to head
#> * 2021-01-22 12:30:33: Calculating division rank #1
#> * 2021-01-22 12:30:34: Calculating division rank #2
#> * 2021-01-22 12:30:34: Calculating division rank #3
#> * 2021-01-22 12:30:34: Calculating division rank #4
#> * 2021-01-22 12:30:34: Calculating seed #1
#> * 2021-01-22 12:30:34: Calculating seed #2
#> * 2021-01-22 12:30:34: Calculating seed #3
#> * 2021-01-22 12:30:34: Calculating seed #4
#> * 2021-01-22 12:30:34: Calculating seed #5
#> * 2021-01-22 12:30:34: Calculating seed #6
#> * 2021-01-22 12:30:34: Calculating seed #7
#> # A tibble: 64 x 10
#>      sim division  team  games  wins win_pct div_pct conf_pct div_rank  seed
#>    <int> <chr>     <chr> <int> <dbl>   <dbl>   <dbl>    <dbl>    <dbl> <dbl>
#>  1  2019 AFC East  BUF      16  10    0.625    0.5     0.583         2     5
#>  2  2019 AFC East  MIA      16   5    0.312    0.333   0.333         4    NA
#>  3  2019 AFC East  NE       16  12    0.75     0.833   0.667         1     3
#>  4  2019 AFC East  NYJ      16   7    0.438    0.333   0.333         3    NA
#>  5  2019 AFC North BAL      16  14    0.875    0.833   0.833         1     1
#>  6  2019 AFC North CIN      16   2    0.125    0.167   0.167         4    NA
#>  7  2019 AFC North CLE      16   6    0.375    0.5     0.5           3    NA
#>  8  2019 AFC North PIT      16   8    0.5      0.5     0.5           2     7
#>  9  2019 AFC South HOU      16  10    0.625    0.667   0.667         1     4
#> 10  2019 AFC South IND      16   7    0.438    0.5     0.417         3    NA
#> 11  2019 AFC South JAX      16   6    0.375    0.333   0.5           4    NA
#> 12  2019 AFC South TEN      16   9    0.562    0.5     0.583         2     6
#> 13  2019 AFC West  DEN      16   7    0.438    0.5     0.5           2    NA
#> 14  2019 AFC West  KC       16  12    0.75     1       0.75          1     2
#> 15  2019 AFC West  LAC      16   5    0.312    0       0.25          4    NA
#> 16  2019 AFC West  OAK      16   7    0.438    0.5     0.417         3    NA
#> 17  2019 NFC East  DAL      16   8    0.5      0.833   0.583         2    NA
#> 18  2019 NFC East  NYG      16   4    0.25     0.333   0.25          3    NA
#> 19  2019 NFC East  PHI      16   9    0.562    0.833   0.583         1     4
#> 20  2019 NFC East  WAS      16   3    0.188    0       0.167         4    NA
#> 21  2019 NFC North CHI      16   8    0.5      0.667   0.583         3    NA
#> 22  2019 NFC North DET      16   3.5  0.219    0       0.208         4    NA
#> 23  2019 NFC North GB       16  13    0.812    1       0.833         1     2
#> 24  2019 NFC North MIN      16  10    0.625    0.333   0.583         2     6
#> 25  2019 NFC South ATL      16   7    0.438    0.667   0.5           2    NA
#> 26  2019 NFC South CAR      16   5    0.312    0.167   0.167         4    NA
#> 27  2019 NFC South NO       16  13    0.812    0.833   0.75          1     3
#> 28  2019 NFC South TB       16   7    0.438    0.333   0.417         3    NA
#> 29  2019 NFC West  ARI      16   5.5  0.344    0.167   0.292         4    NA
#> 30  2019 NFC West  LA       16   9    0.562    0.5     0.583         3     7
#> 31  2019 NFC West  SEA      16  11    0.688    0.5     0.667         2     5
#> 32  2019 NFC West  SF       16  13    0.812    0.833   0.833         1     1
#> 33  2020 AFC East  BUF      16  13    0.812    1       0.833         1     2
#> 34  2020 AFC East  MIA      16  10    0.625    0.5     0.583         2    NA
#> 35  2020 AFC East  NE       16   7    0.438    0.5     0.5           3    NA
#> 36  2020 AFC East  NYJ      16   2    0.125    0       0.0833        4    NA
#> 37  2020 AFC North BAL      16  11    0.688    0.667   0.583         2     5
#> 38  2020 AFC North CIN      16   4.5  0.281    0.167   0.333         4    NA
#> 39  2020 AFC North CLE      16  11    0.688    0.5     0.583         3     6
#> 40  2020 AFC North PIT      16  12    0.75     0.667   0.75          1     3
#> 41  2020 AFC South HOU      16   4    0.25     0.333   0.25          3    NA
#> 42  2020 AFC South IND      16  11    0.688    0.667   0.583         2     7
#> 43  2020 AFC South JAX      16   1    0.0625   0.167   0.0833        4    NA
#> 44  2020 AFC South TEN      16  11    0.688    0.833   0.667         1     4
#> 45  2020 AFC West  DEN      16   5    0.312    0.167   0.333         4    NA
#> 46  2020 AFC West  KC       16  14    0.875    0.667   0.833         1     1
#> 47  2020 AFC West  LAC      16   7    0.438    0.5     0.5           3    NA
#> 48  2020 AFC West  LV       16   8    0.5      0.667   0.5           2    NA
#> 49  2020 NFC East  DAL      16   6    0.375    0.333   0.417         3    NA
#> 50  2020 NFC East  NYG      16   6    0.375    0.667   0.417         2    NA
#> 51  2020 NFC East  PHI      16   4.5  0.281    0.333   0.333         4    NA
#> 52  2020 NFC East  WAS      16   7    0.438    0.667   0.417         1     4
#> 53  2020 NFC North CHI      16   8    0.5      0.333   0.5           2     7
#> 54  2020 NFC North DET      16   5    0.312    0.167   0.333         4    NA
#> 55  2020 NFC North GB       16  13    0.812    0.833   0.833         1     1
#> 56  2020 NFC North MIN      16   7    0.438    0.667   0.417         3    NA
#> 57  2020 NFC South ATL      16   4    0.25     0.167   0.167         4    NA
#> 58  2020 NFC South CAR      16   5    0.312    0.167   0.333         3    NA
#> 59  2020 NFC South NO       16  12    0.75     1       0.833         1     2
#> 60  2020 NFC South TB       16  11    0.688    0.667   0.667         2     5
#> 61  2020 NFC West  ARI      16   8    0.5      0.333   0.5           3    NA
#> 62  2020 NFC West  LA       16  10    0.625    0.5     0.75          2     6
#> 63  2020 NFC West  SEA      16  12    0.75     0.667   0.75          1     3
#> 64  2020 NFC West  SF       16   6    0.375    0.5     0.333         4    NA

Created on 2021-01-22 by the reprex package (v0.3.0)

mrcaseb commented 3 years ago

All right I think the three main functions compute_division_ranks(), compute_conference_seeds() and compute_draft_order() are ready.

Here a final example how to use them

library(dplyr, warn.conflicts = FALSE)
options(digits = 3)
options(tibble.print_min = 64)
games <- readRDS(url("https://github.com/leesharpe/nfldata/blob/master/data/games.rds?raw=true")) %>%
  dplyr::filter(season %in% 2018:2019) %>%
  dplyr::select(sim = season, game_type, week, away_team, home_team, result)

games %>%
  nflseedR::compute_division_ranks() %>%
  nflseedR::compute_conference_seeds(h2h = .$h2h, playoff_seeds = 6) %>% 
  nflseedR::compute_draft_order(games = games, h2h = .$h2h)

grafik

mrcaseb commented 3 years ago

Did some testing and put modified Lee's season sim using nflseedR. Looks good.

I would appreciate it if someone can check my English in the documentation. I tend to use complicated wording in a foreign language.

leesharpe commented 3 years ago

Add global functions that wraps everything and does the simulation?

Is this still the plan? And/or do you need me to help out with this? Otherwise this is all looking fantastic! :)

mrcaseb commented 3 years ago

Add global functions that wraps everything and does the simulation?

Is this still the plan? And/or do you need me to help out with this? Otherwise this is all looking fantastic! :)

I think I can't do that as the wrapper needs estimate_games() and simulate_games() as function arguments. And I have no idea how to make a function an argument for another function.

But I have a new idea instead: we make a pkgdown website and add an article showing how to simulate seasons with the help of the package. So what I want to do is:

leesharpe commented 3 years ago

This makes sense to me. I also think I want to give a "better starting point" to the package. Example initial ratings for teams, and so forth. I'll work on that.

What documentation were you asking to be looked at? This was unclear to me.

mrcaseb commented 3 years ago

What documentation were you asking to be looked at? This was unclear to me.

The function documentation is done above the function definition. Those blocks are translated by roxygen during the package building process and than appear in the help.

For example this

https://github.com/leesharpe/nflseedR/blob/c631a050d0aa6fd392e50a26d1f24963b5ce2178/R/compute_division_ranks.R#L1-L61

becomes this (image cropped)

image
mrcaseb commented 3 years ago

This makes sense to me. I also think I want to give a "better starting point" to the package. Example initial ratings for teams, and so forth. I'll work on that.

I have added the required files for the articles to the folder vignettes and added some ideas for the content. You can work in the Rmd files and knit them for preview. However, only the Rmd file will be pushed to the repo. pkgdown will knit them during the site building process. Therefore the runtime shouldn't be longer than about 20-30 mins in case you want to show something computationally heavy.

For the pkgdown setup the repo has to be public, so I'll wait with those steps

mrcaseb commented 3 years ago

Just pushed some examples in nflseedR.Rmd for the "Get started" page (https://github.com/leesharpe/nflseedR/blob/master/vignettes/articles/nflseedR.Rmd)

mrcaseb commented 3 years ago

I have added the function simulate_nfl() now that wraps everything. It takes custom functions for game simulation as argument and it looks like it is working well. Some further test make sense and I would ask you @leesharpe to specify the meaning of some parameters here (replace the dots). https://github.com/leesharpe/nflseedR/blob/65287777137e5372812af25b993c4e1f3c883322/R/simulate_nfl.R#L9-L11

This functions can do the simulation rounds in parallel processes and it can show progress updates. However, the user has to activate those explicitely before calling the function (doing this inside the package is considered bad practice).

Here is an example how to use the function and how to activate parallel processing as well as progress updates

library(nflseedR)
library(dplyr)

# round out (away from zero)
round_out <- function(x) {
  x[x < 0] <- floor(x[x < 0])
  x[x > 0] <- ceiling(x[x > 0])
  return(x)
}

# function to estimate games
my_estimate <- function(g) {
  # replace with your own function
  # g = games data

  # define
  # estimate = is the median spread expected (positive = home team favored)
  # wp = is the probability of the team winning the game

  # this example estimates at PK/0 and 50%

  g <- g %>%
    mutate(estimate = 0, wp = 0.5)
  return(g)
}

# function to simulate games
my_simulate <- function(g, w) {
  # replace with your own function
  # only simulate games through week w
  # only simulate games with is.na(result)

  # define
  # result = how many points home team won by
  # can add additional columns as well (e.g. Elo)

  g <- g %>%
    dplyr::mutate(result = ifelse(is.na(result) & week <= w,
      round_out(rnorm(n(), estimate, 14)),
      result
    ))
  return(g)
}

# Activate progress updates
progressr::handlers(global = TRUE)

# Parallel processing can be activated via the following line
# future::plan("multisession")

# Simulate the season 4 times in 2 rounds
sim <- simulate_nfl(
  2020,
  estimate_games = my_estimate,
  simulate_games = my_simulate,
  fresh_season = TRUE,
  simulations = 4,
  sims_per_round = 2
)
mrcaseb commented 3 years ago

Dumping this here in case we need it at some point.

I made some benchmarks to try to figure out the best performance of simulate_nfl in parallel processes. I think it depends on the number of available cores so here's the code for the test. The reprex runs with 50 seasons because otherwise it's awful long but I ran my tests with 1000 seasons as well.

It looks like we get optimal performance if the number of rounds results in half of the available cores. So that's my new default value of sims_per_round.

library(nflseedR)
library(microbenchmark)
set.seed(4)

seasons <- 500
mbm <- microbenchmark(
  single_round =  simulate_nfl(2020, fresh_season = TRUE, simulations = seasons, sims_per_round = seasons),
  quarter_cores = simulate_nfl(2020, fresh_season = TRUE, simulations = seasons, sims_per_round = seasons / future::availableCores() * 4),
  half_cores    = simulate_nfl(2020, fresh_season = TRUE, simulations = seasons, sims_per_round = seasons / future::availableCores() * 2),
  full_cores    = simulate_nfl(2020, fresh_season = TRUE, simulations = seasons, sims_per_round = seasons / future::availableCores() * 1),
  times = 5
  )
#> * 2021-02-15 12:23:34: Loading games data
#> * 2021-02-15 12:23:35: Beginning simulation of 500 seasons in 4 rounds
#> * 2021-02-15 12:24:06: Combining simulation data
#> * 2021-02-15 12:24:08: Aggregating across simulations
#> * 2021-02-15 12:24:08: Loading games data
#> * 2021-02-15 12:24:08: Beginning simulation of 500 seasons in 4 rounds
#> * 2021-02-15 12:24:34: Combining simulation data
#> * 2021-02-15 12:24:35: Aggregating across simulations
#> * 2021-02-15 12:24:35: Loading games data
#> * 2021-02-15 12:24:35: Beginning simulation of 500 seasons in 4 rounds
#> * 2021-02-15 12:25:02: Combining simulation data
#> * 2021-02-15 12:25:02: Aggregating across simulations
#> * 2021-02-15 12:25:02: Loading games data
#> * 2021-02-15 12:25:03: Beginning simulation of 500 seasons in 4 rounds
#> * 2021-02-15 12:25:29: Combining simulation data
#> * 2021-02-15 12:25:31: Aggregating across simulations
#> * 2021-02-15 12:25:31: Loading games data
#> * 2021-02-15 12:25:31: Beginning simulation of 500 seasons in 8 rounds
#> * 2021-02-15 12:25:58: Combining simulation data
#> * 2021-02-15 12:26:00: Aggregating across simulations
#> * 2021-02-15 12:26:00: Loading games data
#> * 2021-02-15 12:26:00: Beginning simulation of 500 seasons in 2 rounds
#> * 2021-02-15 12:26:31: Combining simulation data
#> * 2021-02-15 12:26:32: Aggregating across simulations
#> * 2021-02-15 12:26:32: Loading games data
#> * 2021-02-15 12:26:32: Beginning simulation of 500 seasons in 2 rounds
#> * 2021-02-15 12:27:02: Combining simulation data
#> * 2021-02-15 12:27:02: Aggregating across simulations
#> * 2021-02-15 12:27:03: Loading games data
#> * 2021-02-15 12:27:03: Beginning simulation of 500 seasons in 1 round
#> * 2021-02-15 12:27:48: Combining simulation data
#> * 2021-02-15 12:27:49: Aggregating across simulations
#> * 2021-02-15 12:27:49: Loading games data
#> * 2021-02-15 12:27:49: Beginning simulation of 500 seasons in 2 rounds
#> * 2021-02-15 12:28:19: Combining simulation data
#> * 2021-02-15 12:28:20: Aggregating across simulations
#> * 2021-02-15 12:28:20: Loading games data
#> * 2021-02-15 12:28:20: Beginning simulation of 500 seasons in 4 rounds
#> * 2021-02-15 12:28:47: Combining simulation data
#> * 2021-02-15 12:28:49: Aggregating across simulations
#> * 2021-02-15 12:28:49: Loading games data
#> * 2021-02-15 12:28:49: Beginning simulation of 500 seasons in 8 rounds
#> * 2021-02-15 12:29:16: Combining simulation data
#> * 2021-02-15 12:29:17: Aggregating across simulations
#> * 2021-02-15 12:29:17: Loading games data
#> * 2021-02-15 12:29:18: Beginning simulation of 500 seasons in 2 rounds
#> * 2021-02-15 12:29:47: Combining simulation data
#> * 2021-02-15 12:29:48: Aggregating across simulations
#> * 2021-02-15 12:29:48: Loading games data
#> * 2021-02-15 12:29:48: Beginning simulation of 500 seasons in 2 rounds
#> * 2021-02-15 12:30:18: Combining simulation data
#> * 2021-02-15 12:30:19: Aggregating across simulations
#> * 2021-02-15 12:30:19: Loading games data
#> * 2021-02-15 12:30:20: Beginning simulation of 500 seasons in 1 round
#> * 2021-02-15 12:31:05: Combining simulation data
#> * 2021-02-15 12:31:05: Aggregating across simulations
#> * 2021-02-15 12:31:05: Loading games data
#> * 2021-02-15 12:31:06: Beginning simulation of 500 seasons in 8 rounds
#> * 2021-02-15 12:31:33: Combining simulation data
#> * 2021-02-15 12:31:35: Aggregating across simulations
#> * 2021-02-15 12:31:35: Loading games data
#> * 2021-02-15 12:31:36: Beginning simulation of 500 seasons in 8 rounds
#> * 2021-02-15 12:32:01: Combining simulation data
#> * 2021-02-15 12:32:03: Aggregating across simulations
#> * 2021-02-15 12:32:03: Loading games data
#> * 2021-02-15 12:32:03: Beginning simulation of 500 seasons in 1 round
#> * 2021-02-15 12:32:49: Combining simulation data
#> * 2021-02-15 12:32:49: Aggregating across simulations
#> * 2021-02-15 12:32:50: Loading games data
#> * 2021-02-15 12:32:50: Beginning simulation of 500 seasons in 1 round
#> * 2021-02-15 12:33:34: Combining simulation data
#> * 2021-02-15 12:33:35: Aggregating across simulations
#> * 2021-02-15 12:33:35: Loading games data
#> * 2021-02-15 12:33:35: Beginning simulation of 500 seasons in 1 round
#> * 2021-02-15 12:34:23: Combining simulation data
#> * 2021-02-15 12:34:24: Aggregating across simulations
#> * 2021-02-15 12:34:24: Loading games data
#> * 2021-02-15 12:34:24: Beginning simulation of 500 seasons in 8 rounds
#> * 2021-02-15 12:34:51: Combining simulation data
#> * 2021-02-15 12:34:52: Aggregating across simulations
mbm
#> Unit: seconds
#>           expr      min       lq     mean   median       uq      max neval
#>   single_round 45.22389 45.96561 46.67147 46.27906 46.79665 49.09214     5
#>  quarter_cores 30.50848 30.52964 31.16637 31.25071 31.25375 32.28927     5
#>     half_cores 26.83822 27.78193 29.05832 28.29483 29.06808 33.30856     5
#>     full_cores 27.30666 28.36706 28.67068 28.48463 28.99148 30.20356     5
ggplot2::autoplot(mbm)

grafik

mrcaseb commented 3 years ago

I'll close this as I believe we are done here