dotnet / dotnet/machinelearning

Shall we add option to OneHotEncoding to treat each slot separately?

Open
#3,111 1 comment 1 reaction 0 assignees View on GitHub
area-Transforms Priority:2 question
Dominant language
C#
Stars
9.4k
Forks
2k
Avg merge
2d 20h
Merged PRs (30d)
11

Description

So I'm having file with 39 categorical features.
I'm too lazy to write text loader with 39 columns for them, so I just slap ` new TextLoader.Column("CatFeatures", DataKind.String, 190, 228),`

Now during one hot encoding we will build one huge dictionary for all slots. And I would get huge indicator vector in the end.
I'm not sure is it actually bad, or not.

But if it's bad, I would prefer to have option in OneHotEncoding to treat each slot separately, since am too lazy to write `TextLoader.Column` definition 39 times. Or maybe we can have some kind of
`TextLoader.Columns("Prefix", DataKind.String, 190,228)` object and it would automatically create me 39 columns of `Prefix01`, `Prefix02`, .., `Prefix39` with specified type.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.