-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix population scaling with other_keys
+ supporting fixes/changes
#422
Merged
dajmcdon
merged 11 commits into
cmu-delphi:dev
from
brookslogan:lcb/key_colnames-downstream
Nov 11, 2024
Merged
Fix population scaling with other_keys
+ supporting fixes/changes
#422
dajmcdon
merged 11 commits into
cmu-delphi:dev
from
brookslogan:lcb/key_colnames-downstream
Nov 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Recent/current epiprocess versions silently ignore `extra_keys =`. Pending epiprocess changes will soft-deprecate and route it to `other_keys =` instead, plus add some stricter checks on `other_keys =`.
- Rename `extra_keys` -> `other_keys` when we are going to feed it into `other_keys =`. - Remove some `<edf metadata>$other_keys %||% character()` hedges now that current epiprocess standardizes to character() not NULL and example `epi_df` objects have been updated to that standard.
- Roles should already factor in key_colnames.
dajmcdon
approved these changes
Nov 11, 2024
@@ -112,7 +112,7 @@ make_quantile_reg <- function() { | |||
|
|||
# can't make a method because object is second | |||
out <- switch(type, | |||
rq = dist_quantiles(unname(as.list(x)), object$quantile_levels), # one quantile | |||
rq = dist_quantiles(unname(as.list(x)), object$tau), # one quantile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised this didn't raise an error before...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Please:
dajmcdon.
DESCRIPTION
andNEWS.md
.Always increment the patch version number (the third number), unless you are
making a release PR from dev to main, in which case increment the minor
version number (the second number).
(backwards-incompatible changes to the documented interface) are noted.
Collect the changes under the next release number (e.g. if you are on
0.7.2, then write your changes under the 0.8 heading).
epiprocess
version in theDESCRIPTION
file ifepiprocess
soonepipredict
andepiprocess
Change explanations for reviewer
extra_keys =
withother_keys =
, which is sometimes used in current epiprocess, and will consistently be used/checked in pending epiprocess versions.layer_population_scaling(by = NULL)
when there areother_keys
.step_population_scaling
defaultby
setting toprep
; try to improve messaging.grab_forged_keys
andkey_colnames
to try to be more self-consistent and consistent with pending epiprocesskey_colnames
updates."geo_value"
,"key"
, or"time_value"
roles are present, use them to decide on key.epi_df
as training/test data, as this should set roles.c("geo_value", "time_value")
and available columns. (Though population scaling attempts to deviate from this, instead using the intersection of all column names in the training/test data with non-population column names in the population data. It works for the step, but since postprocessing seems to require anepi_df
, it doesn't effectively work on the layer.)step_population_scaling
work with non-epi_df
s.layer_population_scaling
work with non-epi_df
s it has both the"geo_value"
and"time_value"
columns, and, if other key columns are present, that all the epikeytime roles are manually set.quantile_reg
errors producing just single predictions, to enable writing "simple" tests.Magic GitHub syntax to mark associated Issue(s) as resolved when this is merged into the default branch
layer_population_scaling
withby = NULL
doesn't work with anyother_keys
#410key_colnames()
is called with ignored argumentextra_keys =
#412quantile_reg()
with single level raises errors, at least withmethod = "fnc"
#419