tidymodels / parsnip

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

indicating case weight support in `show_model_info()` #1000

Closed simonpcouch closed 7 months ago

simonpcouch commented 1 year ago

From #996:

library(tidymodels)

# custom model info:
set_new_model("discrim_mixture")
set_model_mode(model = "discrim_mixture", mode = "classification")
set_model_engine(
  "discrim_mixture", 
  mode = "classification", 
  eng = "mda"
)
set_dependency("discrim_mixture", eng = "mda", pkg = "mda")

show_model_info("discrim_mixture")
#> Information for `discrim_mixture`
#>  modes: unknown, classification 
#> 
#>  engines: 
#>    classification: mdaNA
#> 
#> ¹The model can use case weights.
#> 
#>  no registered arguments.
#> 
#>  no registered fit modules.
#> 
#>  no registered prediction modules.

show_model_info("linear_reg")
#> Information for `linear_reg`
#>  modes: unknown, regression 
#> 
#>  engines: 
#>    regression: brulee, glm¹, glmnet¹, keras, lm¹, spark¹, stan¹
#> 
#> ¹The model can use case weights.
#> 
#>  [truncated output for clarity]

Created on 2023-09-14 with reprex v2.0.2

"¹The model can use case weights." means that only engines with the superscripted 1 can use case weights. In cases where some engines can support case weights, the notation is clear, but when there's no case weight support for any engine (and thus no superscripted 1 previouslt), that footnote seems like it's saying that every engine used with the model can use case weights. We ought to fix that—I'll open up a separate issue.

Originally posted by @simonpcouch in https://github.com/tidymodels/parsnip/issues/996#issuecomment-1719792452

hfrick commented 1 year ago

offtopic: issue #1000 !!

github-actions[bot] commented 6 months ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.