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

Remove predict_<type>_glmnet() for all types but "raw" #878

Open
hfrick opened this issue Feb 22, 2023 · 2 comments
Open

Remove predict_<type>_glmnet() for all types but "raw" #878

hfrick opened this issue Feb 22, 2023 · 2 comments

Comments

@hfrick
Copy link
Member

hfrick commented Feb 22, 2023

Following on from #877, the glmnet methods for predict_numeric(), predict_class(), and predict_classprob() would only evaluate the model spec before handing off to the method for model_fit. Let's check if that is necessary or if we can remove those functions altogether.

@hfrick
Copy link
Member Author

hfrick commented Mar 6, 2023

predict_numeric_glmnet <- function(object, new_data, ...) {
object$spec <- eval_args(object$spec)
predict_numeric.model_fit(object, new_data = new_data, ...)
}
predict_class_glmnet <- function(object, new_data, ...) {
object$spec <- eval_args(object$spec)
predict_class.model_fit(object, new_data = new_data, ...)
}
predict_classprob_glmnet <- function(object, new_data, ...) {
object$spec <- eval_args(object$spec)
predict_classprob.model_fit(object, new_data = new_data, ...)
}

@hfrick
Copy link
Member Author

hfrick commented Mar 13, 2023

Looks like we may not need eval_args() anymore. Current plan:

  • demonstrate that we indeed do not need eval_args() anymore
  • remove usage of this in extension pkgs and parsnip
  • deprecate eval_args()
  • remove predict_<type>_glmnet() where possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant