-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-1399] multiclass-mcc metric enhancements #14874
Conversation
* Rename metric from "PCC" to "mMCC" because though the math is derived from Pearson CC, it's utility is as a multiclass extension of Mathews CC. * Harden mx.metric.mMCC.update to more variations of input format, similar to mx.metric.Accuracy.update.
verified that the additional checks in mx.metric.MMCC.update() are not a bottleneck. |
Oh, I should clarify this here; I discovered that use cases like the fastText example from gluon-nlp expect metrics to be comfortable taking predictions already |
@tlby thanks for the patch! Since PCC has already been merged for almost a month, there might be people who already depend on PCC. If there is, then renaming PCC to MMCC will likely break them. Since PCC hasn't made into a release yet, it's technically not breaking a released API, but with that in mind, do you feel necessary to rename the class? |
I don't think it's absolutely necessary, but I definitely regret the name choice because while the implementation came from a discrete derivation of the Pearson correlation coefficient, all a user cares about is that it's a multiclass extension of Matthews correlation coefficient. When it comes to using these metrics Pearson is for continuous and Matthews is for discrete predictions. This metric is discrete so I feel it was misnamed. I later discovered that the formula I used is equivalent to one mentioned in Wikipedia as an extension of Matthews. Perhaps we should leave "pcc" as an alias for the sake of reverse compatibility? |
@mxnet-label-bot add [pr-awaiting-review] |
@szha Could you please review it again? Thanks! |
@szha Gentle ping... |
Is this PR good to go? |
@karan6181 @piyushghai @vandanavk the class rename needs to be reverted |
…ar to mx.metric.Accuracy.update.
Thanks @tlby! The only thing left is that we need test cases to cover both code paths. |
@szha Is this PR good to merge now ? |
Description
multiclass-mcc metric enhancements
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
from Pearson CC, it's utility is as a multiclass extension of Mathews CC.
mx.metric.Accuracy.update.
Comments
The name change from
mx.metric.PCC()
tomx.metric.MMCC()
for this metric has not yet been included in any releases or tagged branches, and for anyone following master the code update would be trivial.