# Function \`confusion\_matrix \` in MLJ always fails

**URL:** <https://discourse.julialang.org/t/function-confusion-matrix-in-mlj-always-fails/81521>\
**Category:** General Usage\
**Tags:** mlj\
**Created:** [May 23, 2022, 3:39pm UTC](https://discourse.julialang.org/t/function-confusion-matrix-in-mlj-always-fails/81521 "2022-05-23T15:39:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [May 23, 2022, 4:14pm UTC](https://discourse.julialang.org/t/function-confusion-matrix-in-mlj-always-fails/81521/3 "2022-05-23T16:14:03Z")

</div>

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

```julia
# 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](https://discourse.julialang.org/t/should-we-have-a-package-update-psa/61923) and work with project environments, limited to only the specific packages you need for a specific script, instead.

---

_[View the full topic](https://discourse.julialang.org/t/function-confusion-matrix-in-mlj-always-fails/81521)._
