-
Notifications
You must be signed in to change notification settings - Fork 42
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
Harmonize message text about eval_time
being ignored
#811
Comments
Another variation of the text, here from library(tidymodels)
library(censored)
#> Loading required package: survival
library(finetune)
lung_surv <- lung %>%
dplyr::mutate(surv = Surv(time, status), .keep = "unused")
# mode is not censored regression
set.seed(2193)
tune_res <-
linear_reg(penalty = tune(), engine = "glmnet") %>%
tune_grid(
mpg ~ .,
resamples = vfold_cv(mtcars, 2),
metrics = metric_set(rmse),
grid = 2,
control = control_grid(save_pred = TRUE)
)
foo <- int_pctl(tune_res, metrics = "rmse", times = 2, eval_time = 10)
#> Warning: The 'eval_time' argument is not needed for this data set.
#> Error in `purrr::map2()`:
#> ℹ In index: 1.
#> Caused by error in `check_tidy()`:
#> ! `statistics` should select a list column of tidy results.
# non-dynamic metric
set.seed(2193)
tune_res <-
proportional_hazards(penalty = tune(), engine = "glmnet") %>%
tune_grid(
surv ~ .,
resamples = vfold_cv(lung_surv, 2),
grid = 2,
control = control_grid(save_pred = TRUE),
metrics = metric_set(concordance_survival, brier_survival_integrated),
eval_time = c(10, 20)
)
foo <- int_pctl(tune_res, times = 2, eval_time = 10, metrics = "concordance_survival")
#> Warning: The 'eval_time' argument is not needed for this data set.
#> Error in `purrr::map2()`:
#> ℹ In index: 1.
#> Caused by error in `dplyr::rename()`:
#> ! Can't rename columns that don't exist.
#> ✖ Column `term` doesn't exist.
foo <- int_pctl(tune_res, times = 2, eval_time = 10, metrics = "brier_survival_integrated")
#> Warning: The 'eval_time' argument is not needed for this data set.
#> Error in `purrr::map2()`:
#> ℹ In index: 1.
#> Caused by error in `dplyr::rename()`:
#> ! Can't rename columns that don't exist.
#> ✖ Column `term` doesn't exist.
Created on 2024-01-16 with reprex v2.0.2 |
12 tasks
This issue 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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I prefer the version that explicitly says the
eval_time
argument will be ignored.Part of #704, wait till we've got that all done?
Created on 2024-01-16 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: