Include tidypredict as part of tidymodels workflow for glm models

Hey all.

I'm working on a prediction model in production and facing some tradeoffs.

I'm using logistic-regression, that tends to be heavy on workflows objects and makes the whole flow more complicated. One solution provided is to use { LiblineaR } which seems reasonable.

But I want to leverage { tidypredict }, problem is that it does not support {LiblineaR} and I'm not sure if it works properly with {recipes} etc...

Any thoughts?

Thanks!

Have you used the butcher package on the fitted model? That can slim it down substantially.

There is also tidypredict's successor, orbital. I don't think that it supports LiblineaR but has a lot of other features that might help you out.

I did try to use butcher, but it doesn't really change a lot for glm models as discussed here:

I'll try to use update_role() instead of my old "outcome~." syntax but I don't think it would make a big difference.

Thing is that I need to save the model object somehow. My company uses MLflow, it's kind of weird to find out that linear models are way heavier than Python's version of lightGBM.

My alternative approach is just to save the model's object on my docker image and keep track of the coefficients and the original names of training data on our DB.

Should be deterministic I guess.

I'll try to use orbital as well. Thanks!