-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP prettyToString(ConfusionMatrix<MultiLabel>) and labelConfusionMat… #128
base: main
Are you sure you want to change the base?
WIP prettyToString(ConfusionMatrix<MultiLabel>) and labelConfusionMat… #128
Conversation
…rixToString(ConfusionMatrix<MultiLabel>) - seems correct except testMultiLabelConfusionMatrixToStrings() labelConfusionMatrixToString has off-diagonal values?
Thanks for working this up. Before I can review this in detail you'll need to either sign the OCA, or let me know what email address you've previously signed it under. There will be a bot which does this automatically at some point, but it isn't enabled on the Tribuo repo yet. |
Hmm, I made an account and trying to submit an Individual OCA but tribuo isn't listed in https://oca.opensource.oracle.com/?ojr=contrib-create%3Btype%3Dindividual Projects? I must be doing doing something silly? |
I'll follow up internally. The OCA signing process recently changed, maybe Tribuo isn't enrolled in it properly. |
Could you try again? It should be in the system now. |
All good @Craigacp - my OCA is "Under Review" |
Thanks. I think the turnaround time is 24-48 hours for this, which is frustrating, but at least it's a one time thing. Hopefully as the new system beds in it'll get quicker (in the old system you had to mail in a form). |
@Craigacp my OCA was accepted. |
Excellent. We should get the bot running at some point soon so it'll tag things when people have signed it. I'll dig into the confusion matrix having off diagonal entries, that might be an issue in how we tabulate the results. We've got some tests that covered this so I'll try to figure out what's different in your example. In the meantime the |
After some consideration I'm not sure what the off diagonal elements on an all label by all label multi-label confusion matrix should correspond to. If the true label is How would you expect the off diagonal entries to be computed? |
done - PR updated - I added a little whitespace and simplified the implementation slightly with
I guess treat each atomic label independently, as if it were true label a, prediction b; true label c, prediction is b
Treating each atomic label independently would give: true label a, prediction a; true label a, prediction b; true label a, prediction c. I attempted to "fix" my current implementation and both test cases
wrong!
I think it should be (update: I think this is wrong too!)
|
I think the issue with treating it completely independently is that summing the all class version of a multi-label confusion matrix doesn't lead to a sensible number. Normally when you sum all the entries you end up with the number of examples (or the number of labels). That feels like a nice thing to enforce, but if you do then you need to add extra columns for "false positive" and "false negative" and then you only have entries on the label/label diagonal and in those two columns. |
MultiLabel/Core/src/test/java/org/tribuo/multilabel/IndependentMultiLabelTest.java
Outdated
Show resolved
Hide resolved
a41a33c
to
b5b1206
Compare
…redictions) - partially represent false negatives by calling them false positives tied to some predicted label if there is one
b5b1206
to
0dcab25
Compare
Learned some things - maybe got my intended result this time.
I now believe the following is correct and useful (currently in multi-label predictions:
don't handle false negatives
"charge" false negatives to a predicted label if there is one
|
So I'd like to get the Therefore it might be best to split this into two PRs, I'm agnostic to if you put the toString in a separate PR or the |
Description
Simpler attempt at "conversion" of
MultiLabelConfusionMatrix
to correspondingLabelConfusionMatrix
) - not meant to actually be merged. How can this be done better?Seems correct except
testMultiLabelConfusionMatrixToStrings()
labelConfusionMatrixToString
has off-diagonal values?Motivation
Such a feature would make analysis of
MultiLabel
models simpler: in particularMultiLabelConfusionMatrix
toString()
is hard to interpret. ComparetestMultiLabel()
to pretty toString
or
labelConfusionMatrixToString
Unfortunately, something seems off in
testMultiLabelConfusionMatrixToStrings()
current
toString()
as pretty toString looks fine
but why does
labelConfusionMatrixToString
have off-diagonal values?