-
Notifications
You must be signed in to change notification settings - Fork 12
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
Clean-up of $fit
slot of fitted glmnet models
#266
Conversation
revdep check job_name:
|
I would also be perplexed by an increase in object size, but I'm seeing different object sizes than you for some reason. I do indeed see a decrease in object sizes with this PR🤔 With
|
Possibly related oddities: tidymodels/stacks#117. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, phew. I'm with it!
A bit of my mental map that needed adjusting for me to wrap my head around this: coxnet_train()
is mostly analogous to parsnip::xgb_train()
or bonsai::train_lightgbm()
, except that the latter two only pre-process the inputs from parsnip and return what the engine functions return, while coxnet_train()
also post-processes the engine output and returns it as a slot, $fit
, in the output. It still gives its output the same class()[1]
as its $fit
slot, though. This is all for good reasons. :)
This pull request 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. |
closes #265
But: the size of the total object is now bigger?? 🤔
To compare from the issue/
main
:Created on 2023-04-26 with reprex v2.0.2
Second thoughts
I think this change is the right call regardless of my surprise with the size because
extract_fit_engine()
expects the model to sit inmodel_fit$fit
, notmodel_fit$fit$fit
. Maybe something else also builds on this convention (but I haven't checked).Tests are updated in tidymodels/extratests#149
With
main
dev versionCreated on 2023-11-23 with reprex v2.0.2
With this PR
Created on 2023-11-23 with reprex v2.0.2