You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(tidymodels)
set.seed(6735)
mtcars1<-mtcarsmtcars1$disp<-"no value"folds<- vfold_cv(mtcars1, v=5)
spline_rec<- recipe(mpg~., data=mtcars1) %>%
step_ns(disp) %>%
step_ns(wt)
lin_mod<- linear_reg() %>%
set_engine("lm")
control<- control_resamples(save_pred=TRUE)
spline_res<- fit_resamples(lin_mod, spline_rec, folds, control=control)
#> x Fold1: preprocessor 1/1: Error: All columns selected for the step should be num...#> x Fold2: preprocessor 1/1: Error: All columns selected for the step should be num...#> x Fold3: preprocessor 1/1: Error: All columns selected for the step should be num...#> x Fold4: preprocessor 1/1: Error: All columns selected for the step should be num...#> x Fold5: preprocessor 1/1: Error: All columns selected for the step should be num...#> Warning: All models failed. See the `.notes` column.collect_notes<-function(x) {
x$.notes %>%
bind_rows()
}
spline_res %>%
collect_notes()
#> # A tibble: 5 x 1#> .notes #> <chr> #> 1 preprocessor 1/1: Error: All columns selected for the step should be numeric#> 2 preprocessor 1/1: Error: All columns selected for the step should be numeric#> 3 preprocessor 1/1: Error: All columns selected for the step should be numeric#> 4 preprocessor 1/1: Error: All columns selected for the step should be numeric#> 5 preprocessor 1/1: Error: All columns selected for the step should be numeric
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.
What it says in the title. A function to collect all the errors in a fast and easy way.
basic prototype
Created on 2021-03-28 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: