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

bug fixes for percentile intervals on survival metrics #818

Merged
merged 11 commits into from
Jan 24, 2024
Merged

Conversation

topepo
Copy link
Member

@topepo topepo commented Jan 18, 2024

The initial implementation was only for purely dynamic metrics.

Changes:

  • Adds a quietly argument to choose_eval_time()
  • Adds a function(maybe_choose_eval_time()) that runs choose_eval_time() across the metrics in a metric set to get defaults for all metrics. If an integrated metric is in the set, all of the original evaluation times (from the tune object) are returned.
  • Passed missing eval_time arguments through the missing bootstrap interval machinery.
  • Updated/fixed two existing tests for int_pctl()

Tests to come in extratests

note: the percentile intervals are calculated for each value of the term column (via a group_by(). It would greatly simplify things here if we expanded that to include a few other columns: .config, .iter, and .eval_time. In fact, it might help users if we were to group by term and starts_with("."). I'll start an issue for this in rsample.

@topepo topepo requested a review from hfrick January 19, 2024 01:10
topepo pushed a commit to tidymodels/rsample that referenced this pull request Jan 19, 2024
@topepo topepo marked this pull request as ready for review January 19, 2024 12:21
@topepo
Copy link
Member Author

topepo commented Jan 19, 2024

tidymodels/rsample#465 includes a proposal for some rsample changes. I don't want to force an rsample release so we can keep this PR as-is and, if the rsample changes are ok, update this code later.

R/int_pctl.R Outdated Show resolved Hide resolved
@@ -210,6 +210,7 @@ export(is_recipe)
export(is_workflow)
export(last_fit)
export(load_pkgs)
export(maybe_choose_eval_time)
Copy link
Member

Choose a reason for hiding this comment

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

Why are we exporting this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Mostly future-proofing; I can see us needing this a lot inside of tune but also maybe finetune or future extensions. There's no harm in exporting and we've re-exported a fair number of functions that were originally internal.

R/int_pctl.R Outdated Show resolved Hide resolved
@topepo topepo merged commit 59612cf into main Jan 24, 2024
9 checks passed
@topepo topepo deleted the int-pctl-surv branch January 24, 2024 11:34
Copy link

github-actions bot commented Feb 8, 2024

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants