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

Survival helpers #893

Merged
merged 10 commits into from Mar 1, 2023
Merged

Survival helpers #893

merged 10 commits into from Mar 1, 2023

Conversation

topepo
Copy link
Member

@topepo topepo commented Feb 27, 2023

Move some code from tune to parsnip since we will relocate the IPCW code here. This PR has basic helper functions. Unit tests that require actual Surv objects will be in extratests

topepo added a commit to tidymodels/extratests that referenced this pull request Feb 27, 2023
@EmilHvitfeldt
Copy link
Member

Could this be moved to {hardhat} instead? They would be helpful in {yardstick} which doesn't import/suggests {parsnip}

@topepo
Copy link
Member Author

topepo commented Mar 1, 2023

After talking with @DavisVaughan about moving them to hardhat, he recommended putting them in a portable file that can be added to other packages via usethis::use_standalone("tidymodels/parsnip")

@topepo topepo marked this pull request as ready for review March 1, 2023 02:16
@topepo topepo requested a review from hfrick March 1, 2023 02:16
Copy link
Member

@hfrick hfrick left a comment

Choose a reason for hiding this comment

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

I like the idea of the standalone file! There are suggestions for you to take or leave, I just want to point you to the one .extract_surv_status() and when it converts the status to 0/1

R/standalone-survival.R Outdated Show resolved Hide resolved
R/standalone-survival.R Outdated Show resolved Hide resolved
R/standalone-survival.R Outdated Show resolved Hide resolved
R/standalone-survival.R Outdated Show resolved Hide resolved
R/standalone-survival.R Outdated Show resolved Hide resolved
R/ipcw.R Outdated Show resolved Hide resolved
tests/testthat/test-ipcw.R Show resolved Hide resolved
tests/testthat/test-ipcw.R Outdated Show resolved Hide resolved
topepo and others added 3 commits March 1, 2023 13:53
Co-authored-by: Hannah Frick <hfrick@users.noreply.github.com>
@topepo topepo merged commit 070f1b2 into main Mar 1, 2023
topepo added a commit to tidymodels/extratests that referenced this pull request Mar 1, 2023
* additional unit tests for tidymodels/parsnip#893

* import survival

* namespaces since functions are now not exported

* updates from reviewer feedback
@EmilHvitfeldt EmilHvitfeldt deleted the survival-helpers branch March 1, 2023 22:43
@github-actions
Copy link

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 Mar 17, 2023
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.

None yet

3 participants