Skip to content

ensemble models #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Nov 17, 2023
Merged

ensemble models #51

merged 19 commits into from
Nov 17, 2023

Conversation

dsweber2
Copy link
Contributor

@dsweber2 dsweber2 commented Oct 30, 2023

closes #37, #4, and now #21
A PR to add ensembles. Initially this is just adding one that averages the quantiles of the forecasts handed to it (using a user-specified function, which is currently targeting median and mean), I'm currently working on adding in the proper targets and naming scheme, which is why this is a draft

@dsweber2 dsweber2 added this to the Pipeline improvements milestone Oct 30, 2023
@dsweber2 dsweber2 self-assigned this Oct 30, 2023
@dsweber2 dsweber2 force-pushed the ensemble branch 2 times, most recently from e01d3f3 to c4abc0e Compare November 3, 2023 00:21
@dsweber2 dsweber2 changed the title feat: ensemble model definition ensemble models Nov 3, 2023
@dsweber2 dsweber2 marked this pull request as ready for review November 3, 2023 22:44
@dsweber2 dsweber2 requested a review from dshemetov November 3, 2023 22:44
Copy link
Contributor

@dshemetov dshemetov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial review, will do another pass after merge

@dsweber2
Copy link
Contributor Author

@nmdefries I'm having some difficulties getting the ensembles to plot in the shiny dashboard; hypothetically it should be just the same data format as the other forecasters, but it's throwing errors. Looking at e.g. tar_read(score_ultrafaultless.leading) it's a tibble of size 11,016x21, and not 4, but the dashboard is throwing this error. Do we have a collection of unit tests for the plotting functions or some other way of debugging borked behavior?

Warning: Error in mutate: ℹ In argument: `forecaster = gsub(...)`.
Caused by error:
! `forecaster` must be size 11016 or 1, not 4.
  146: <Anonymous>
  145: signalCondition
  144: signal_abort
  143: abort
  142: <Anonymous>
  141: signalCondition
  140: signal_abort
  139: abort
  138: dplyr_internal_error
  137: eval
  136: mask$eval_all_mutate
  135: mutate_col
  133: mutate_cols
  132: mutate.data.frame
  131: mutate
  121: list2
  120: bind_rows
  118: <reactive:filtered_scorecards_reactive> [/home/dsweber/allHail/delphi/exploration-tooling/app.R#141]
  102: filtered_scorecards_reactive
  101: renderPlotly [/home/dsweber/allHail/delphi/exploration-tooling/app.R#152]
  100: func
   97: shinyRenderWidget
   96: func
   83: renderFunc
   82: output$main_plot
    1: runApp
Input to asJSON(keep_vec_names=TRUE) is a named vector. In a future version of jsonlite, this option will not be supported, and named vectors will be translated into arrays instead of objects. If you want JSON object output, please use a named list instead. See ?toJSON.

…ions

Shiny app forecaster options cleanup
@dsweber2
Copy link
Contributor Author

@dshemetov with Nat's fix of the dashboard, I think this is finally ready for final review

Copy link
Contributor

@dshemetov dshemetov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, we probably need to get this PR in and iterate instead of polishing it for more weeks, but I made some comments here and there.

@dsweber2
Copy link
Contributor Author

dsweber2 commented Nov 17, 2023

If you want to merge and get an actual largescale run going on mentat over the weekend that would be awesome. Kinda wish there were a good mechanism for migrating review items to issues, but there's this: #70.

@dshemetov
Copy link
Contributor

An issue with a linkback works!

@dshemetov dshemetov merged commit 6d1ca2a into main Nov 17, 2023
@dshemetov dshemetov deleted the ensemble branch November 17, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

decide on ensemble format
3 participants