Skip to content
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

Merged
merged 6 commits into from
Jul 3, 2018
Merged

Conversation

NMO13
Copy link
Contributor

@NMO13 NMO13 commented Jul 2, 2018

Added overall accuracy cell to confusion matrix:

image

@NMO13 NMO13 requested a review from thinkh July 2, 2018 08:33
@thinkh
Copy link
Member

thinkh commented Jul 3, 2018

@NMO13 Any idea why the x-axis in the detail plot is so cluttered? In malevo-daily it is correct...

image

@@ -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)));
Copy link
Member

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));

renderOverallAccuracyCell(data: number[][], renderer: IMatrixRendererChain, labels: string[], singleEpochIndex: number[], colors: string[]) {
const maxVal = Math.max(...data.map((x: number[]) => Math.max(...x)));

const res = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong code indentation

return arr;
}

for(const m of matrices) {
Copy link
Member

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));

@NMO13
Copy link
Contributor Author

NMO13 commented Jul 3, 2018

@NMO13 Any idea why the x-axis in the detail plot is so cluttered? In malevo-daily it is correct...

Because its epoch granularity dependent.... I fix that.

@thinkh
Copy link
Member

thinkh commented Jul 3, 2018

@NMO13 Thanks. I saw now that it is already described in #164 and #180. So you can work on it in a different branch.

@thinkh thinkh merged commit 1359dc8 into develop Jul 3, 2018
@thinkh thinkh deleted the NMO13/features/overall_accuracy_curve branch July 3, 2018 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants