tidymodels / parsnip

A tidy unified interface to models
https://parsnip.tidymodels.org
Other
599 stars 89 forks source link

Document which models support multivate (multiple outcomes) regression #798

Open juliasilge opened 2 years ago

juliasilge commented 2 years ago

This SO question points out that it is difficult to know which models you can use if you have a multiple-outcome problem. I believe you can see this by searching for which models use the maybe_multivariate() function but documenting it in a way that surfaces this info to folks would be more helpful.

wbuchanan commented 1 year ago

Any chance of this being implemented any time soon?

Deleetdk commented 6 months ago

I got this error message. Looking on Google, I am the only person, so I might as well note it here.

Internal error: Multiple outcomes are not supported in.estimate_metrics()``

Here's a simple reprex, just for ease of reference:

library(tidymodels)

set.seed(1)
iris_folds = vfold_cv(iris, v = 5)

some_model = linear_reg()

some_recipe = recipe(
  iris,
  vars = names(iris),
  roles = c(rep("outcome", 4), "predictor"))

#workflow
some_wf = workflow() %>% 
  add_model(some_model) %>% 
  add_recipe(some_recipe)

#fit
some_fit = some_wf %>% 
  fit_resamples(
    iris_folds,
    control = control_resamples(save_pred = TRUE)
  )
#> → A | error:   Internal error: Multiple outcomes are not supported in `.estimate_metrics()`.
#> There were issues with some computations   A: x1
#> There were issues with some computations   A: x5
#> 
#> Warning: All models failed. Run `show_notes(.Last.tune.result)` for more
#> information.

Created on 2024-04-26 with [reprex v2.0.2](https://reprex.tidyverse.org/)