JuliaAI / MLJDecisionTreeInterface.jl

MIT License
9 stars 4 forks source link

Reverse roles of key and value in `encoding` returned in fitted params #19

Closed ablaom closed 1 year ago

ablaom commented 2 years ago
julia> fitted_params(mach).encoding
  Dict{CategoricalArrays.CategoricalValue{String, UInt32}, UInt32} with 3 entries:
    "virginica"  => 0x00000003
    "setosa"     => 0x00000001
    "versicolor" => 0x00000002

This is really backwards. To interpret the DecisionTree.jl tree object, one wants the label given the reference integer.

ablaom commented 2 years ago

This will also make encoding consistent with MLJLISVMInterface.jl