tidymodels / parsnip

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

`contr_one_hot()` is also in hardhat but not exported #1215

Open topepo opened 1 month ago

topepo commented 1 month ago
          `contr_one_hot()` is also in parsnip (where it is exported). 

There are tests there that are a bit more extensive: https://github.com/tidymodels/parsnip/blob/main/tests/testthat/test-contr_one_hot.R

You can bring those over here and I'll open a parsnip issue about the duplication. hardhat would have to export this function for parsnip to use it.

_Originally posted by @topepo in https://github.com/tidymodels/hardhat/pull/268#discussion_r1812633876_