Closed
Description
These don't return an object class specific to their model:
library(tidymodels)
#> Registered S3 method overwritten by 'tune':
#> method from
#> required_pkgs.model_spec parsnip
data("two_class_dat")
logistic_reg(penalty = 0.1) %>%
set_engine("glmnet") %>%
fit(Class ~ ., data = two_class_dat) %>%
pluck("fit") %>%
class()
#> [1] "lognet" "glmnet"
logistic_reg(penalty = 0.1) %>%
set_engine("glmnet", family = quasibinomial(link = "logit")) %>%
fit(Class ~ ., data = two_class_dat) %>%
pluck("fit") %>%
class()
#> [1] "glmnetfit" "glmnet"
Created on 2021-05-04 by the reprex package (v1.0.0.9000)
We should add class to the parsnip
model or restrict this family for this engine.