Reporting on tidymodels
Question and context
Hi,
I've been using a tidymodels approach to perform a logistic regression. The glm model is stored in various objects, including the top-level workflow. This has some extractor functions which return a model (e.g.: pull_workflow_spec()), but report says it can't work with it. The workflow-model's class() is [_glm, model_fit].
Is there a way to use report directly on a tidymodels- (or parsnip-) generated model?
Thanks!
Not sure how others see this, but for me personally the tidymodels framework is of rather low priority. Currently, there's no explicit support for tidymodels, however, this might change quite quickly.
@mbac supporting tidymodels in report would require adding its support in the other easystats packages, i.e., insight, parameters, performance and effectsize, which is not the case currently.
That said, this is something we will probably want to add (as our goal is to have quite an extensive coverage of the R ecosystem) at some point, though I cannot give you any timeline ☺️ Stay tuned, though! I will open an issue on insight to track the progress as it would be the first step.
tidymodels is now supported in insight, parameters and performance.
Thank you very much for taking care of this!
@mattansb is it much effort to implement in effectsize?
No idea. Aren't most tidymodels' models non-parametric? (I have never used tidymodels before, only caret).
Anyway, if someone can open an issue over at effectsize with some examples, I can start working on these when I get beck next week (:
tidymodels returns an object of class model_fit, where object$fit is the actual model object. So you generally could do this:
foo.model_fit <- function(x, ...) {
foo(x$fit, ...)
}
tidymodels is just a more complicated way of fitting models in R. ;-)
It seems recently that tidymodels is almost mature, and its fitted model or workflow can provide a unified interface. Really looking forward to seeing report fully support tidymodels.