Is there a function to calculate Kappa in MLJ? If no, I wrote a function (shown below) and I am looking for a more efficient implementation.

```
function kappa(predictions, original)
# Confusion matrix
confmat = MLJ.confusion_matrix(mode.(predictions), original)
confmat = confmat.mat
z = (TP = confmat[1,1], FP = confmat[1,2], FN = confmat[2,1], TN = confmat[2,2])
# Calculate kappa
length_y = length(original)
p_0 = (z.TN + z.TP)/length_y
p_e_1 = (z.TP + z.FP) * (z.TP + z.FN)/(length_y^2)
p_e_2 = (z.TN + z.FP) * (z.TN + z.FN)/(length_y^2)
p_e = p_e_1 + p_e_2
κ = (p_0 - p_e)/(1 - p_e)
return κ
end
```

Thanks in advance!