Skip to content
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

Consider adding merge_predx_samples and ideas from predx_to_submission_df functions in https://github.com/reichlab/cdcfluutils/blob/master/R/predx-utils.R #8

Open
elray1 opened this issue Oct 26, 2019 · 1 comment

Comments

@elray1
Copy link
Contributor

elray1 commented Oct 26, 2019

To be able to use this for FluSight challenge submissions, I implemented a couple of utility functions to go from samples to submission files. Do we want to add either of these functions or ideas from them to the predx package?

  • merge_predx_samples takes a predx_df that has duplicate rows of samples for a given location and target and merges those rows together. This arose in my use case from having obtained samples from multiple different runs of a model (e.g. different MCMC chains)
  • predx_to_submission_df should probably be named predx_samples_to_submission_df and gets you from a predx_df with only samples for the prediction targets to a submission data frame.
@majohansson
Copy link
Contributor

merge_predx_samples (or collect_predx_samples?) seems like it could be a useful general function. It comes to mind that the merging process could present some challenges, like accidentally merging things you don't mean to by forgetting a grouping factor or merging samples that were duplicated accidentally. I am guessing that you implementation relies on transform_predx? Is there a generic implementation of that which could help? Like calling transform_predx on a list of predx objects with conversiosn specificed (e.g., SampleCat to BinCat and Sample to BinLwr)?

And is predx_to_submission_df sort of shortcut for this? I am not sure that would always be useful. For example, a "submission" elsewhere could require samples so converting all would not necessarily be a standard approach.

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

No branches or pull requests

2 participants