-
Notifications
You must be signed in to change notification settings - Fork 12
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
Test predicting for out-of-domain time points #273
Conversation
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.
looking good. Found two discrepancies in output. might not be isolated to out-of-domain time pints
fit(Surv(time, status) ~ ., data = lung) | ||
|
||
expect_no_error( | ||
preds <- predict(mod, obs_without_NA, type = "survival", eval_time = eval_time_obs_max_and_ood) |
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.
This prediction differs in output format than then other ones with this one being
str(preds)
tibble [1 × 1] (S3: tbl_df/tbl/data.frame)
$ .pred: list<tibble[,2]> [1:1]
..$ : tibble [2 × 2] (S3: tbl_df/tbl/data.frame)
.. ..$ .eval_time : num [1:2] 1022 2000
.. ..$ .pred_survival: num [1:2] NA NA
..@ ptype: tibble [0 × 2] (S3: tbl_df/tbl/data.frame)
.. ..$ .eval_time : num(0)
.. ..$ .pred_survival: num(0)
opossed to partykit which produces
str(preds)
tibble [1 × 1] (S3: tbl_df/tbl/data.frame)
$ .pred:List of 1
..$ : tibble [2 × 2] (S3: tbl_df/tbl/data.frame)
.. ..$ .eval_time : num [1:2] 1022 2000
.. ..$ .pred_survival: num [1:2] 0.0499 0.0499
fit(Surv(time, status) ~ ., data = lung_orsf) | ||
|
||
expect_no_error( | ||
preds <- predict(mod, obs_without_NA, type = "survival", eval_time = eval_time_obs_max_and_ood) |
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.
same issue as above
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. |
closes #10
I've taken "out of domain" to mean eval time points not within the observed range of time points. This PR tests that this does cause censored to error and leaves the prediction value to the individual engines.