You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered:
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.
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?
The text was updated successfully, but these errors were encountered: