Skip to content

Non-Dummy variable codings in ContinuousEncoder #534

@ParadaCarleton

Description

@ParadaCarleton

Right now, MLJModels.jl has ContinuousEncoder, which automatically transforms into one of two codings:

  1. Dummy variable coding (one-hot with last category dropped)
  2. Redundant variable coding (one-hot)

However, these aren't always the most useful codings for effective regularization, and there are many others in common use. For example, the most common way to encode ordinal variables is with sequential difference encoding; with this encoding, regularization pulls adjacent categories closer together, which improves model performance relative to either treating ordered variables as categorical (discarding ordering information) or treating them as continuous (using an equal-distance assumption that is often incorrect). Similarly, effect coding allows you to regularize categories towards the grand mean (rather than regularize every category towards 0, or regularize all categories towards one other category).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions