Skip to content
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

handle quasi-likelihood glmnet models better #483

Closed
topepo opened this issue May 4, 2021 · 1 comment · Fixed by #890
Closed

handle quasi-likelihood glmnet models better #483

topepo opened this issue May 4, 2021 · 1 comment · Fixed by #890
Labels
feature a feature request or enhancement

Comments

@topepo
Copy link
Member

topepo commented May 4, 2021

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.

@github-actions
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant