Skip to content

More verbose check_outcome() #919

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 4 commits into from
Mar 13, 2023
Merged

More verbose check_outcome() #919

merged 4 commits into from
Mar 13, 2023

Conversation

EmilHvitfeldt
Copy link
Member

This PR will close #887.

library(parsnip)

logistic_reg() |>
  fit(mpg ~ ., data = mtcars)
#> Error in `check_outcome()`:
#> ! For a classification model, the outcome should be a `factor`, not a `numeric`.

Created on 2023-03-09 with reprex v2.0.2

@EmilHvitfeldt EmilHvitfeldt requested a review from hfrick March 9, 2023 23:31
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.

Love it!

Merge commit '00f3cdb5500b55043866d22bd45f47bd01bc5ecf'

#Conflicts:
#	NEWS.md
#	tests/testthat/_snaps/misc.md
#	tests/testthat/test_misc.R
@EmilHvitfeldt EmilHvitfeldt merged commit 2ead20c into main Mar 13, 2023
@EmilHvitfeldt EmilHvitfeldt deleted the check-outcome branch March 13, 2023 02:26
@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 28, 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.

improve check_outcome() error message
2 participants