-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added overall accuracy cell #189
Conversation
@NMO13 Any idea why the x-axis in the detail plot is so cluttered? In malevo-daily it is correct... |
src/ConfusionMatrix.ts
Outdated
@@ -489,6 +497,19 @@ export class ConfusionMatrix implements IAppView { | |||
}); | |||
} | |||
|
|||
renderOverallAccuracyCell(data: number[][], renderer: IMatrixRendererChain, labels: string[], singleEpochIndex: number[], colors: string[]) { | |||
const maxVal = Math.max(...data.map((x: number[]) => Math.max(...x))); |
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.
Alternative to flatten the array first and use only one Math.max
:
const maxVal = Math.max(...[].concat(...data));
src/ConfusionMatrix.ts
Outdated
renderOverallAccuracyCell(data: number[][], renderer: IMatrixRendererChain, labels: string[], singleEpochIndex: number[], colors: string[]) { | ||
const maxVal = Math.max(...data.map((x: number[]) => Math.max(...x))); | ||
|
||
const res = { |
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.
Wrong code indentation
src/ConfusionMeasures.ts
Outdated
return arr; | ||
} | ||
|
||
for(const m of matrices) { |
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 don't you use map
?
return matrices.map((m) => calcSummedPercent1(m));
Because its epoch granularity dependent.... I fix that. |
Added overall accuracy cell to confusion matrix: