Function `confusion_matrix ` in MLJ always fails

I can reproduce the error with the versions you are using, so the key thing you should ask yourself is why you’re using such outdated versions of packages - CategoricalArrays 0.8.3 is from September 2020.

Given that you are showing us

#  Status `~/.julia/environments/v1.7/Project.toml`

I would venture a guess that you are dumping all of your packages into the default environment, thereby (in the long run) almost guaranteeing versioning conflicts. Don’t do this and work with project environments, limited to only the specific packages you need for a specific script, instead.

2 Likes