Skip to content
Advertisement

how to fix the values displayed in a confusion matrix in exponential form to normal form

While working with my project, I have obtained a confusion matrix from test data as:

JavaScript

Output as:

JavaScript

Using seaborn and matplotlib, I visualized it using the code:

JavaScript

The output obtained is:

Confusion matrix

The problem is values with 3 digits (here 1102 been displayed as 11e+03) or above are being displayed in exponential form.

Is there a way to display it in its normal form?

Advertisement

Answer

You can use the "fmt" option:

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement