MLLabelUtils.jl
MLLabelUtils.jl copied to clipboard
Utility package for working with classification targets and label-encodings
As outlined by @oxinabox in #17 - [ ] It should be possible to convert upwards in the number of labels. at least for integers. (e.g. from a `Indices{_,2}` to...
In cases with highly unbalanced class distribution, some classes occur in the training data so rarely, that it is better to ignore them. In these cases, it would be useful...
Hi, I have been trying to extend the classify interface to binary NativeLabels. While figuring out the internals of classify, I have found some inconsistencies that make reasoning about the...
Please review this pull request, the function for rarelabel encoding is working as it is expected.
I get this ```julia julia> x=[1 0; 0 1] 2×2 Array{Int64,2}: 1 0 0 1 julia> label2ind(x, LabelEnc.OneOfK(2)) ERROR: MethodError: no method matching isposlabel(::Array{Int64,2}, ::MLLabelUtils.LabelEnc.OneOfK{Int64,2}) Closest candidates are: isposlabel(::Bool, ::MLLabelUtils.LabelEnc.OneOfK)...
I find convenient the following methods: ```julia onehot(x) = onehot(Int, x) onehot(T::Type, x) = convertlabel(LabelEnc.OneOfK{T}, x) ``` Worth the addition?