invenia / invenia/FeatureTransforms.jl
OneHotEncoding should retain metadata
- Dominant language
- Julia
- Stars
- 37
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
The current `OneHotEncoding` transform seems to always just return a NxP binary matrix despite knowing what the categories are and potentially being passed a type that would allow you to retain that info.
For example, if I have `OneHotEncoding(Hour(0):Hour(1):Hour(23))` and then I pass a dataframe with an `HoD` column, I could easily see that transform returning a new dataframe with a column name for each hour. Similarly, if we took a function argument, we could do something like:
```julia
FeatureTransforms.ohe(Hour, data; dims=:time)
```
This would return a new `KeyedArray` or `AxisArray` that retains the category information for the `p` dimension, and also uses the `dims` argument to mean use dimension keys for `KeyedArray`s or `AxisArrays`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.