-
Notifications
You must be signed in to change notification settings - Fork 393
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
Add confusion matrix #533
Add confusion matrix #533
Conversation
Codecov Report
@@ Coverage Diff @@
## master #533 +/- ##
===========================================
+ Coverage 0 86.77% +86.77%
===========================================
Files 0 347 +347
Lines 0 12019 +12019
Branches 0 389 +389
===========================================
+ Hits 0 10430 +10430
- Misses 0 1589 +1589
Continue to review full report at Codecov.
|
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, question re confMatrixThresholds parameter upper bound
@@ -122,9 +120,9 @@ private[op] class OpMultiClassificationEvaluator | |||
parent = this, | |||
name = "confMatrixThresholds", | |||
doc = "sequence of threshold values used for confusion matrix metrics", | |||
isValid = _.forall(x => x >= 0.0 && x <= 1.0) | |||
isValid = _.forall(x => x >= 0.0 && x < 1.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is 1.0
not allowed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For multinomial logistic regression, the scenario where top probability equals to 1.0 will never happen. For random forest it's quite unlikely, unless the record falls onto one and the only one leaf node of the same class in every tree. Therefore it doesn't really make sense to have confidence threshold of 1.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wondering how much value is there to restrict it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gerashegalov are you concerned about too many values present in the confMatrixThresholds
array? That's a valid concern, I can add a check for that
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/salesforce/op/evaluators/OpMultiClassificationEvaluator.scala
Outdated
Show resolved
Hide resolved
local/src/test/scala/com/salesforce/op/local/OpWorkflowModelLocalTest.scala
Outdated
Show resolved
Hide resolved
… with e-agent team
@@ -597,6 +600,13 @@ case class MisClassificationsPerCategory | |||
MisClassifications: Map[Double, Long] | |||
) | |||
|
|||
case class labelPredictionConfidence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feifjiang are you planning to use LabelPredictionConfidenceCt and labelPredictionConfidence somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tovbinm sorry - forgot to remove it. Just updated the PR again.
@tovbinm @gerashegalov Can either one of you merge my PR with master? I don't have write access. |
@feifjiang thank you for your contribution! |
@tovbinm Thank you for the comments and being so responsive!! |
This PR replaces #532 #530