-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Description
We are using object$lambda
rather than object$fit$lambda
and that causes:
library(parsnip)
data("lending_club")
multi_reg <- multinom_reg()
multi_reg_glmnet <- multi_reg %>% set_engine("glmnet")
multi_reg_fit <- fit(multi_reg_glmnet, verification_status ~ annual_inc + sub_grade, data = lending_club)
multi_reg_fit %>%
multi_predict(new_data = lending_club, type = "prob", penalty = 0.01)
#> # A tibble: 9,857 x 1
#> .pred
#> <list>
#> 1 <tibble [1 × 4]>
#> 2 <tibble [1 × 4]>
#> 3 <tibble [1 × 4]>
#> 4 <tibble [1 × 4]>
#> 5 <tibble [1 × 4]>
#> 6 <tibble [1 × 4]>
#> 7 <tibble [1 × 4]>
#> 8 <tibble [1 × 4]>
#> 9 <tibble [1 × 4]>
#> 10 <tibble [1 × 4]>
#> # … with 9,847 more rows
multi_reg_fit %>%
multi_predict(new_data = lending_club, type = "prob")
#> Error in arrange_impl(.data, dots): cannot arrange column of class 'NULL' at position 2
This is the line that needs to be updated:
https://github.com/tidymodels/parsnip/blob/master/R/logistic_reg.R#L286
Metadata
Metadata
Assignees
Labels
No labels