Skip to content

Be more verbose about prediction types in check_pred_type() #899

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 3 commits into from
Mar 14, 2023

Conversation

hfrick
Copy link
Member

@hfrick hfrick commented Mar 2, 2023

This PR makes check_pred_type() equally verbose about the prediction type for censored regression as it already is for classification.

@hfrick hfrick requested a review from EmilHvitfeldt March 2, 2023 15:13
Copy link
Member

@EmilHvitfeldt EmilHvitfeldt left a comment

Choose a reason for hiding this comment

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

i generally like this style of control-flow for readability. Is this function run a lot of times? it might be worth it time wise to use a if-else / switch()

@hfrick
Copy link
Member Author

hfrick commented Mar 3, 2023

Good point - it's run with every predict() plus it's a bit more readable with switch() now. Thanks!

@hfrick hfrick requested a review from EmilHvitfeldt March 6, 2023 16:01
Copy link
Member

@EmilHvitfeldt EmilHvitfeldt left a comment

Choose a reason for hiding this comment

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

Love it!

@hfrick hfrick merged commit 915e70e into main Mar 14, 2023
@hfrick hfrick deleted the check_pred_type branch March 14, 2023 10:54
@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 30, 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.

2 participants