vincentarelbundock / marginaleffects

R package to compute and plot predictions, slopes, marginal means, and comparisons (contrasts, risk ratios, odds, etc.) for over 100 classes of statistical and ML models. Conduct linear and non-linear hypothesis tests, or equivalence tests. Calculate uncertainty estimates using the delta method, bootstrapping, or simulation-based inference
https://marginaleffects.com
Other
462 stars 47 forks source link

Improve machine learning vignette #920

Closed vincentarelbundock closed 11 months ago

vincentarelbundock commented 1 year ago
etiennebacher commented 1 year ago

Hi, there are also two typos in the last plot of the vignette:

vincentarelbundock commented 1 year ago
library(tidymodels)
library(marginaleffects)

# broken
workflow(factor(gear) ~ hp * mpg, multinom_reg()) |>
  fit(data = mtcars)  |>
  get_vcov()

# works
set_engine(multinom_reg(), "nnet") |>
  fit(factor(gear) ~ mpg * hp, data = mtcars) |>
  get_vcov()
vincentarelbundock commented 1 year ago

Thanks @etiennebacher Should be fixed now