mine-cetinkaya-rundel / stat2-whole-game

0 stars 0 forks source link

simulation-based confidence and prediction intervals for predictions #3

Open simonpcouch opened 2 years ago

simonpcouch commented 2 years ago

re: https://github.com/mine-cetinkaya-rundel/stat2-whole-game/blob/c0f512c6a680faedd496526b54fea0b3ba5b32fa/README.md#L201-L205

Lots of interesting points made here, and links out to GH issues (incl on parsnip), blog posts, etc. Comments around here, specifically most get at your question.

As for conf intervals, something a la #1 with

  # some purrr magic required to get the fits themselves
  boot_fits_parsnip <- 
    boot_fits %>%
    pluck(".extracts") %>%
    map(pluck, ".extracts") %>%
    flatten()

  # generate predictions from each of the fits
  boot_preds <-
    boot_fits_parsnip %>%
    map_dfr(predict, new_data = penguins_te)

gets a good bit of the way there.

simonpcouch commented 2 years ago

Ah, and an experimental package came out of it. :)

mine-cetinkaya-rundel commented 2 years ago

Thanks for digging into this! Some of the syntax in the pipelines above seem like they would be harder to teach/learn than their infer counterparts, which makes total sense considering why infer exists.