JuliaAI / MLJModels.jl

Home of the MLJ model registry and tools for model queries and mode code loading
MIT License
79 stars 27 forks source link

A column with `missing` as first value trips `OneHotEncoder` #467

Closed ablaom closed 1 year ago

ablaom commented 1 year ago
using MLJModels, CategoricalArrays, MLJBase
X = (x=categorical([missing, 1, 2, 1])
t  = OneHotEncoder(drop_last = true)
f, _, report = MLJBase.fit(t, 1, X)

Re-posted from https://github.com/JuliaAI/MLJModels.jl/issues/458#issuecomment-1201137389, which diagnoses the issue and suggests a fix.