In the example below we have x.pool.levels which I don't believe is public API. You can instead do CategoricalArrays.levels(x) for a CategoricalValue or a CategoricalArray. After CategoricalArrays.jl v1.0, this returns a CategoricalVector (previously it returned the unwrap of that). I am separately posting a PR to force v1.0, currently you have 0.10. After that update, you may possibly need to apply CategoricalArrays.unwrap to the result of levels(x) to get "raw" values, if you really need them.
https://github.com/cjdoris/ARFFFiles.jl/blob/a93f9d5c4596e9ccce6b7be2b80e5d960ce6c39b/src/ARFFFiles.jl#L1173
There are other examples of the improper use. I found three with this search: https://github.com/search?q=repo%3Acjdoris%2FARFFFiles.jl%20levels&type=code
cc nalimilan
In the example below we have
x.pool.levelswhich I don't believe is public API. You can instead doCategoricalArrays.levels(x)for aCategoricalValueor aCategoricalArray. After CategoricalArrays.jl v1.0, this returns aCategoricalVector(previously it returned theunwrapof that). I am separately posting a PR to force v1.0, currently you have 0.10. After that update, you may possibly need to applyCategoricalArrays.unwrapto the result oflevels(x)to get "raw" values, if you really need them.https://github.com/cjdoris/ARFFFiles.jl/blob/a93f9d5c4596e9ccce6b7be2b80e5d960ce6c39b/src/ARFFFiles.jl#L1173
There are other examples of the improper use. I found three with this search: https://github.com/search?q=repo%3Acjdoris%2FARFFFiles.jl%20levels&type=code
cc nalimilan