-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Change format of MulticlassConfusionMatrix result to be more self-explanatory #48174
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
Change format of MulticlassConfusionMatrix result to be more self-explanatory #48174
Conversation
66e1005 to
071cbd7
Compare
071cbd7 to
fa6ab5b
Compare
|
Pinging @elastic/ml-core (:ml) |
|
run elasticsearch-ci/packaging-sample-matrix |
4ce3aa3 to
97628e2
Compare
|
@elasticmachine update branch |
1 similar comment
|
@elasticmachine update branch |
2fd6087 to
dfecdf6
Compare
benwtrent
left a comment
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.
I really like the new format. It also gives us flexibility to add new fields in the future if we deem them necessary.
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.
According to the ctor, both of these are nullable.
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.
Done.
...ticsearch/client/ml/dataframe/evaluation/classification/MulticlassConfusionMatrixMetric.java
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.
Should this be nullable? I think it would throw if predictedClasses == null
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.
Done.
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.
might be good to do a otherActualClassCount >= 0 check.
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.
Done.
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.
| this.otherActualClassCount = in.readLong(); | |
| this.otherActualClassCount = in.readVLong(); |
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.
Done.
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.
| out.writeLong(actualClassDocCount); | |
| out.writeVLong(actualClassDocCount); |
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.
Done.
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.
| this.count = in.readLong(); | |
| this.count = in.readVLong(); |
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.
Done.
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.
| out.writeLong(count); | |
| out.writeVLong(count); |
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.
Done.
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.
null check?
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.
Done.
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.
>= 0 check
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.
Done.
cc20654 to
9b1c359
Compare
|
run elasticsearch-ci/packaging-sample-matrix |
9b1c359 to
92a6dd4
Compare
|
run elasticsearch-ci/packaging-sample-matrix |
Current MulticlassConfusionMatrix result can be confusing to the API user.
They have no means to tell if the outer map is actual or predicted. Similarly for inner map.
This PR fixes that by making the format strict (naming each field).
Relates #46735