Skip to content

Better error message if outcome has 0 columns #1003

Closed

Description

@EmilHvitfeldt

Extracted from: https://stackoverflow.com/questions/77305226/why-am-i-receiving-the-error-object-not-found

If someone uses step_dummy() or some other ways in {recipes} to remove the outcome, then parsnip:::check_outcome() throws a wonderfully bad error 😄

library(tidymodels)

rec <- recipe(Species ~ ., data = iris) %>%
  step_dummy(Species)

svm_spec <- 
  svm_rbf() %>% 
  set_engine("kernlab") %>% 
  set_mode("classification")

wflow <- workflow() %>% 
  add_model(svm_spec) %>% 
  add_recipe(rec)

fit(wflow, iris)
#> Error: object '.' not found

Created on 2023-10-16 with reprex v2.0.2

Activity

  1. github-actions commented on Nov 18, 2023

    @github-actions
    Contributor

    This issue 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.

  2. locked and limited conversation to collaborators on Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions