-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
Description
When using confmat(yhat, y, perm=[3,2,1]
the matrix entries seem to change but the labels begin shown are not adjusted:
X, y = @load_iris;
y=coerce(y, OrderedFactor);
tree = @load SVC
treeM = machine(tree, X, y)
fit!(treeM)
yhat = predict(treeM, X);
julia> confmat(yhat, y)
┌─────────────────────────────────────────┐
│ Ground Truth │
┌─────────────┼─────────────┬─────────────┬─────────────┤
│ Predicted │ setosa │ versicol… │ virginica │
├─────────────┼─────────────┼─────────────┼─────────────┤
│ setosa │ 50 │ 0 │ 0 │
├─────────────┼─────────────┼─────────────┼─────────────┤
│ versicol… │ 0 │ 48 │ 0 │
├─────────────┼─────────────┼─────────────┼─────────────┤
│ virginica │ 0 │ 2 │ 50 │
└─────────────┴─────────────┴─────────────┴─────────────┘
julia> confmat(yhat, y, perm=[3, 2, 1])
┌─────────────────────────────────────────┐
│ Ground Truth │
┌─────────────┼─────────────┬─────────────┬─────────────┤
│ Predicted │ setosa │ versicol… │ virginica │
├─────────────┼─────────────┼─────────────┼─────────────┤
│ setosa │ 50 │ 2 │ 0 │
├─────────────┼─────────────┼─────────────┼─────────────┤
│ versicol… │ 0 │ 48 │ 0 │
├─────────────┼─────────────┼─────────────┼─────────────┤
│ virginica │ 0 │ 0 │ 50 │
└─────────────┴─────────────┴─────────────┴─────────────┘
I'm guessing the same is true for rev=...
in the binary case.
tlienart