easystats / report

:scroll: :tada: Automated reporting of objects in R
https://easystats.github.io/report/
Other
677 stars 68 forks source link

Reporting on tidymodels #122

Open mbac opened 3 years ago

mbac commented 3 years ago

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!

strengejacke commented 3 years ago

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.

DominiqueMakowski commented 3 years ago

@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.

strengejacke commented 3 years ago

tidymodels is now supported in insight, parameters and performance.

mbac commented 3 years ago

Thank you very much for taking care of this!

strengejacke commented 3 years ago

@mattansb is it much effort to implement in effectsize?

mattansb commented 3 years ago

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 (:

strengejacke commented 3 years ago

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, ...)
}
strengejacke commented 3 years ago

tidymodels is just a more complicated way of fitting models in R. ;-)

CWen001 commented 1 year ago

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.