Skip to content

restrict fit_xy() from working for censored regression models #445

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

Merged
merged 2 commits into from
Mar 17, 2021

Conversation

hfrick
Copy link
Member

@hfrick hfrick commented Mar 16, 2021

Closes #442

Models with the new mode "censored regression" can't use fit_xy(), they should use fit().

surv_reg models have also been forced to use the formula interface fit(). The check for that has been moved into fit_xy() from check_xy_interface() which checks the details of x and y. The corresponding tests for check_xy_interface() were removed. The tests for an error when using fit_xy() with a surv_reg model are untouched in test_sruv_reg_survreg.R and test_surv_reg_flexsurv.R.

The corresponding tests for models for censored regression are to be added when we have the corresponding model specs in parsnip (#444).

@hfrick hfrick requested a review from topepo March 16, 2021 12:00
Copy link
Member

@topepo topepo left a comment

Choose a reason for hiding this comment

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

We can add test cases for this when we move the model definitions to parsnip from censored.

@topepo topepo merged commit 110257f into master Mar 17, 2021
@topepo topepo deleted the restrict-fit_xy branch March 17, 2021 19:58
@hfrick
Copy link
Member Author

hfrick commented Mar 19, 2021

PR #449 adds the model spec for survival_reg which uses the new mode and includes a test on fit_xy() throwing an error when used with this mode.

@github-actions
Copy link

github-actions bot commented Apr 3, 2021

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 Apr 3, 2021
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.

Restrict fit_xy() from working with censored regression models
2 participants