Skip to main content

Sophisticate Open Confusion Matrix

Project description

conf-mat

PyPI version License: MIT

This library was created to address the confusion in confusion matrices and classification reports generated by libraries like scikit-learn. It displays confusion matrices and their heatmaps in a more aesthetically pleasing, intuitive way. It also presents classification reports and accuracy rates in a manner that clarifies the calculation method and how those results were obtained, which can help alleviate confusion for beginners in machine learning

Installation

You can install conf-mat via pip:

pip install conf-mat

Usage

For Binary Classification

from numpy.random import randint
from matplotlib.pyplot import show
from conf_mat import print_conf_mat, plot_conf_mat, conf_mat_to_html


y_true = randint(0, 2, 1000)
y_pred = randint(0, 2, 1000)


# Show The Confusion Matrix On The Console (Classes Names Are Not Mandatory)
print_conf_mat(y_true, y_pred, classes_names=[False, True])


# Show The Confusion Matrix As A Heat Map (Classes Names Are Not Mandatory)
plot_conf_mat(y_true, y_pred, classes_names=[False, True])
show()  # If You Are Using VSCode And You Are Executing The Code Direcctely


# Show The Confusion Matrix As It Appears On The Console And As A Heat Map On The HTML Page (Classes Names Are Not Mandatory)
conf_mat_to_html(y_true, y_pred, classes_names=[False, True])

Output

Confusion Matrix : 
________________

╒═════════════════════╤═══════════════════════════╤═══════════════════════════╕
│ Classes              Predicted Positive (PP)    Predicted Negative (PN)   │
╞═════════════════════╪═══════════════════════════╪═══════════════════════════╡
│ Actual Positive (P)  True Positive (TP) : 273   False Negative (FN) : 244 │
│                                                 Type II Error (Missed)    │
├─────────────────────┼───────────────────────────┼───────────────────────────┤
│ Actual Negative (N)  False Positive (FP) : 229  True Negative (TN) : 254  │
│                      Type I Error (Wrong)                                 │
╘═════════════════════╧═══════════════════════════╧═══════════════════════════╛

╒══════════╤══════════════════════════════════════════════════════╕
│           Rate (Score)                                         │
╞══════════╪══════════════════════════════════════════════════════╡
│ Accuracy  Correct        TP + TN                               │
│           _______ : _________________  OR  1 - Error  =  0.53  │
│                                                                │
│            Total    TP + FP + FN + TN                          │
├──────────┼──────────────────────────────────────────────────────┤
│ Error     Wrong        FP + FN                                 │
│           _____ : _________________  OR  1 - Accuracy  =  0.47 │
│                                                                │
│           Total   TP + FP + FN + TN                            │
╘══════════╧══════════════════════════════════════════════════════╛


Classification Report : 
_____________________

╒══════════════════╤═════════════════╤════════════════════╤═════════════════════╤════════════════╕
│                   Precision (P)    Recall (R)          F1-Score (F)         Support (S)    │
╞══════════════════╪═════════════════╪════════════════════╪═════════════════════╪════════════════╡
│ Positive (True)   P1 (PPV):        R1 (Sensitivity):   F1 :                 S1 :           │
│                                                                                            │
│                     TP               TP                2 x P1 x R1                         │
│                   _______  = 0.54  _______  = 0.53     ___________  = 0.54   TP + FN = 517 │
│                                                                                            │
│                   TP + FP          TP + FN               P1 + R1                           │
├──────────────────┼─────────────────┼────────────────────┼─────────────────────┼────────────────┤
│ Negative (False)  P0 (NPV):        R0 (Specificity):   F0 :                 S0 :           │
│                                                                                            │
│                     TN               TN                2 x P0 x R0                         │
│                   _______  = 0.51  _______  = 0.53     ___________  = 0.52   FP + TN = 483 │
│                                                                                            │
│                   TN + FN          TN + FP               P0 + R0                           │
├──────────────────┼─────────────────┼────────────────────┼─────────────────────┼────────────────┤
│ Macro Avg         P1 + P0          R1 + R0             F1 + F0              TS = 1000      │
│                   _______  = 0.53  _______  = 0.53     _______  = 0.53                     │
│                                                                                            │
│                      2                2                   2                                │
├──────────────────┼─────────────────┼────────────────────┼─────────────────────┼────────────────┤
│ Weighted Avg      W1               W2                  W3                   TS = 1000      │
│                   __  = 0.53       __  = 0.53          __  = 0.53                          │
│                                                                                            │
│                   TS               TS                  TS                                  │
╘══════════════════╧═════════════════╧════════════════════╧═════════════════════╧════════════════╛

PPV : Positive Predictive Value

NPV : Negative Predictive Value

W1 = (P1 x S1) + (P0 x S0)

W2 = (R1 x S1) + (R0 x S0)

W3 = (F1 x S1) + (F0 x S0)

TS : Total Support = S1 + S0

Note : All Real Numbers Are Rounded With Two Digits After The Comma

You Can Plot, Generate HTML Page For Confusion Matrix And Classification Report Directly From One Calculation

from numpy.random import randint
from matplotlib.pyplot import show
from conf_mat import print_conf_mat, plot_conf_mat, conf_mat_to_html


y_true = randint(0, 2, 1000)
y_pred = randint(0, 2, 1000)


# Show The Confusion Matrix On The Console (Classes Names Are Not Mandatory)
cm = print_conf_mat(y_true, y_pred, classes_names=[False, True])


# Show The Confusion Matrix As A Heat Map (Classes Names Are Not Mandatory)
plot_conf_mat(conf_mat=cm, classes_names=[False, True])
show()  # If You Are Using VSCode And You Are Executing The Code Direcctely


# Show The Confusion Matrix As It Appears On The Console And As A Heat Map On The HTML Page (Classes Names Are Not Mandatory)
conf_mat_to_html(conf_mat=cm, classes_names=[False, True])

You Can Hide Detail Information For Confusion Matrix, Classification Report And Confusion Matrix Heatmap

from numpy.random import randint
from matplotlib.pyplot import show
from conf_mat import print_conf_mat, plot_conf_mat, conf_mat_to_html


y_true = randint(0, 2, 1000)
y_pred = randint(0, 2, 1000)


# Show The Confusion Matrix On The Console (Classes Names Are Not Mandatory)
cm = print_conf_mat(y_true, y_pred, classes_names=[False, True], detail=False)


# Show The Confusion Matrix As A Heat Map (Classes Names Are Not Mandatory)
plot_conf_mat(conf_mat=cm, classes_names=[False, True], detail=False)
show()  # If You Are Using VSCode And You Are Executing The Code Direcctely


# Show The Confusion Matrix As It Appears On The Console And As A Heat Map On The HTML Page (Classes Names Are Not Mandatory)
conf_mat_to_html(conf_mat=cm, classes_names=[False, True], detail=False)

Output

Confusion Matrix : 
________________

╒═════════════════════╤═══════════════════════════╤═══════════════════════════╕
│ Classes                Predicted Positive (PP)    Predicted Negative (PN) │
╞═════════════════════╪═══════════════════════════╪═══════════════════════════╡
│ Actual Positive (P)                        261                        271 │
├─────────────────────┼───────────────────────────┼───────────────────────────┤
│ Actual Negative (N)                        240                        228 │
╘═════════════════════╧═══════════════════════════╧═══════════════════════════╛

╒══════════╤════════════════╕
│             Rate (Score) │
╞══════════╪════════════════╡
│ Accuracy            0.49 │
├──────────┼────────────────┤
│ Error               0.51 │
╘══════════╧════════════════╛


Classification Report : 
_____________________

╒══════════════════╤═════════════════╤══════════════╤════════════════╤═══════════════╕
│                     Precision (P)    Recall (R)    F1-Score (F)    Support (S) │
╞══════════════════╪═════════════════╪══════════════╪════════════════╪═══════════════╡
│ Positive (True)              0.52          0.49            0.51            532 │
├──────────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ Negative (False)             0.46          0.49            0.47            468 │
├──────────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ Macro Avg                    0.49          0.49            0.49           1000 │
├──────────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ Weighted Avg                 0.49          0.49            0.49           1000 │
╘══════════════════╧═════════════════╧══════════════╧════════════════╧═══════════════╛

You Can Plot And Generate HTML Page For Confusion Matrix Directly From One Calculation And Without Print Confusion Matrix And Classification Report

from numpy.random import randint
from matplotlib.pyplot import show
from conf_mat import calc_conf_mat, plot_conf_mat, conf_mat_to_html


y_true = randint(0, 2, 1000)
y_pred = randint(0, 2, 1000)


# Show The Confusion Matrix On The Console (Classes Names Are Not Mandatory)
cm = calc_conf_mat(y_true, y_pred)
print(cm)

# Show The Confusion Matrix As A Heat Map (Classes Names Are Not Mandatory)
plot_conf_mat(conf_mat=cm, classes_names=[False, True], detail=False)
show()  # If You Are Using VSCode And You Are Executing The Code Direcctely


# Show The Confusion Matrix As It Appears On The Console And As A Heat Map On The HTML Page (Classes Names Are Not Mandcatory)
conf_mat_to_html(conf_mat=cm, classes_names=[False, True], detail=False)

Output

[[236, 253], [255, 256]]

For Multi Classification

from numpy.random import randint
from matplotlib.pyplot import show
from conf_mat import print_conf_mat, plot_conf_mat, conf_mat_to_html


y_true = randint(0, 10, 1000)
y_pred = randint(0, 10, 1000)


# Show The Confusion Matrix On The Console (Classes Names Are Not Mandatory)
print_conf_mat(y_true, y_pred, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'])


# Show The Confusion Matrix As A Heat Map (Classes Names Are Not Mandatory)
plot_conf_mat(y_true, y_pred, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'])
show()  # If You Are Using VSCode And You Are Executing The Code Direcctely


# Show The Confusion Matrix As It Appears On The Console And As A Heat Map On The HTML Page (Classes Names Are Not Mandatory)
conf_mat_to_html(y_true, y_pred, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'])

Output

Confusion Matrix : 
________________

╒═══════════╤══════╤══════╤══════╤══════╤══════╤══════╤══════╤══════╤══════╤═══════╕
│ Classes      C1    C2    C3    C4    C5    C6    C7    C8    C9    C10 │
╞═══════════╪══════╪══════╪══════╪══════╪══════╪══════╪══════╪══════╪══════╪═══════╡
│ C1            5    17    12    11    12    13     6    13    10      7 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C2           10     6    10    11    13    11    13     8    11     11 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C3            6     6    12     8    10     5    11     8     7     11 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C4           14    13    10     8     9     5    12    14     9      7 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C5           12     9    15     5     8     9     6     8    10     10 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C6           12    16    15     9    10     8    10    11    11     12 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C7           12     9    12    14    12     6    13    13     7     14 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C8            6    11     7    10    10    12     8    10     8     11 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C9           15     7     8     6     8     6     5     4    14     12 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C10          10    11    11    13     8    11    12    12     6     15 │
╘═══════════╧══════╧══════╧══════╧══════╧══════╧══════╧══════╧══════╧══════╧═══════╛

Yellow  : Not None Correct Values / True Positive (TP) OR True Negative (TN)
Red     : Not None Wrong Values / False Positive (FP) OR False Negative (FN)
Green   : None Correct Values
Blue    : None Wrong Values

╒══════════╤════════════════════════════════════════════════════════════════╕
│           Rate (Score)                                                   │
╞══════════╪════════════════════════════════════════════════════════════════╡
│ Accuracy  Correct      Sum Of Yellow Values                              │
│           _______ : ____________________________  OR  1 - Error  =  0.1  │
│                                                                          │
│            Total    Sum Of Yellow And Red Values                         │
├──────────┼────────────────────────────────────────────────────────────────┤
│ Error     Wrong        Sum Of Red Values                                 │
│           _____ : ____________________________  OR  1 - Accuracy  =  0.9 │
│                                                                          │
│           Total   Sum Of Yellow And Red Values                           │
╘══════════╧════════════════════════════════════════════════════════════════╛


Classification Report : 
_____________________

╒══════════════╤═════════════════╤══════════════╤════════════════╤═══════════════╕
│                 Precision (P)    Recall (R)    F1-Score (F)    Support (S) │
╞══════════════╪═════════════════╪══════════════╪════════════════╪═══════════════╡
│ C1                       0.05          0.05            0.05            106 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C2                       0.06          0.06            0.06            104 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C3                       0.11          0.14            0.12             84 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C4                       0.08          0.08            0.08            101 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C5                       0.08          0.09            0.08             92 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C6                       0.09          0.07            0.08            114 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C7                       0.14          0.12            0.12            112 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C8                       0.1           0.11            0.1              93 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C9                       0.15          0.16            0.16             85 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C10                      0.14          0.14            0.14            109 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ Macro Avg                0.1           0.1             0.1            1000 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ Weighted Avg             0.1           0.1             0.1            1000 │
╘══════════════╧═════════════════╧══════════════╧════════════════╧═══════════════╛

Precision    : Yellow Value / Sum Of Yellow Value Column

Recall       : Yellow Value / Sum Of Yellow Value Row

F1-Score     : (2 x Precision x Recall) / (Precision + Recall)

Support      : Sum Of Each Row

Macro Avg    :

               Precision : (Sum Of Precision Column) / Classes Count

               Recall    : (Sum Of Recall Column) / Classes Count

               F1-Score  : (Sum Of F1-Score Column) / Classes Count

               Support   : Total (Sum Of All Matrix)

Weighted Avg :

               Precision : (Sum Of (Precision x support)) / Total (Sum Of All Matrix)

               Recall    : (Sum Of (Recall x Support)) / Total (Sum Of All Matrix)

               F1-Score  : (Sum Of (F1-Score x Support)) / Total (Sum Of All Matrix)

               Support   : Total (Sum Of All Matrix)

Note : All Real Numbers Are Rounded With Two Digits After The Comma

You Can Plot, Generate HTML Page For Confusion Matrix And Classification Report Directly From One Calculation

from numpy.random import randint
from matplotlib.pyplot import show
from conf_mat import print_conf_mat, plot_conf_mat, conf_mat_to_html


y_true = randint(0, 10, 1000)
y_pred = randint(0, 10, 1000)


# Show The Confusion Matrix On The Console (Classes Names Are Not Mandatory)
cm = print_conf_mat(y_true, y_pred, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'])


# Show The Confusion Matrix As A Heat Map (Classes Names Are Not Mandatory)
plot_conf_mat(conf_mat=cm, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'])
show()  # If You Are Using VSCode And You Are Executing The Code Direcctely


# Show The Confusion Matrix As It Appears On The Console And As A Heat Map On The HTML Page (Classes Names Are Not Mandatory)
conf_mat_to_html(conf_mat=cm, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'])

You Can Hide Detail Information For Confusion Matrix, Classification Report And Confusion Matrix Heatmap

from numpy.random import randint
from matplotlib.pyplot import show
from conf_mat import print_conf_mat, plot_conf_mat, conf_mat_to_html


y_true = randint(0, 10, 1000)
y_pred = randint(0, 10, 1000)


# Show The Confusion Matrix On The Console (Classes Names Are Not Mandatory)
cm = print_conf_mat(y_true, y_pred, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'], detail=False)


# Show The Confusion Matrix As A Heat Map (Classes Names Are Not Mandatory)
plot_conf_mat(conf_mat=cm, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'], detail=False)
show()  # If You Are Using VSCode And You Are Executing The Code Direcctely


# Show The Confusion Matrix As It Appears On The Console And As A Heat Map On The HTML Page (Classes Names Are Not Mandatory)
conf_mat_to_html(conf_mat=cm, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'], detail=False)

Output

Confusion Matrix : 
________________

╒═══════════╤══════╤══════╤══════╤══════╤══════╤══════╤══════╤══════╤══════╤═══════╕
│ Classes      C1    C2    C3    C4    C5    C6    C7    C8    C9    C10 │
╞═══════════╪══════╪══════╪══════╪══════╪══════╪══════╪══════╪══════╪══════╪═══════╡
│ C1           10     5     7     7     8    10     9    10    12      8 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C2            7    14    14     9     9    13    14    11    14      7 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C3           13    12     5     9     6     8     9    10    14      8 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C4            6    11     9    18    11     7    10    11     6      7 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C5            9     5    11     9     7     8     8    20     9     10 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C6           12     5     8    11    11    12    14    14    11      7 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C7           13     8    10     7    10    12    15    10     8      8 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C8           10     5     6    14    11     9     9    10     4     13 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C9           11    13    10    10    13    10     8    12     9     15 │
├───────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼───────┤
│ C10          11    12    11    10     9     8     6    14    12     15 │
╘═══════════╧══════╧══════╧══════╧══════╧══════╧══════╧══════╧══════╧══════╧═══════╛

╒══════════╤════════════════╕
│             Rate (Score) │
╞══════════╪════════════════╡
│ Accuracy            0.12 │
├──────────┼────────────────┤
│ Error               0.89 │
╘══════════╧════════════════╛


Classification Report : 
_____________________

╒══════════════╤═════════════════╤══════════════╤════════════════╤═══════════════╕
│                 Precision (P)    Recall (R)    F1-Score (F)    Support (S) │
╞══════════════╪═════════════════╪══════════════╪════════════════╪═══════════════╡
│ C1                       0.1           0.12            0.11             86 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C2                       0.16          0.12            0.14            112 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C3                       0.05          0.05            0.05             94 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C4                       0.17          0.19            0.18             96 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C5                       0.07          0.07            0.07             96 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C6                       0.12          0.11            0.12            105 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C7                       0.15          0.15            0.15            101 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C8                       0.08          0.11            0.09             91 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C9                       0.09          0.08            0.09            111 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ C10                      0.15          0.14            0.15            108 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ Macro Avg                0.12          0.11            0.11           1000 │
├──────────────┼─────────────────┼──────────────┼────────────────┼───────────────┤
│ Weighted Avg             0.12          0.12            0.12           1000 │
╘══════════════╧═════════════════╧══════════════╧════════════════╧═══════════════╛

You Can Plot And Generate HTML Page For Confusion Matrix Directly From One Calculation And Without Print Confusion Matrix And Classification Report

from numpy.random import randint
from matplotlib.pyplot import show
from conf_mat import calc_conf_mat, plot_conf_mat, conf_mat_to_html


y_true = randint(0, 10, 1000)
y_pred = randint(0, 10, 1000)


# Show The Confusion Matrix On The Console (Classes Names Are Not Mandatory)
cm = calc_conf_mat(y_true, y_pred)
print(cm)

# Show The Confusion Matrix As A Heat Map (Classes Names Are Not Mandatory)
plot_conf_mat(conf_mat=cm, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'], detail=False)
show()  # If You Are Using VSCode And You Are Executing The Code Direcctely


# Show The Confusion Matrix As It Appears On The Console And As A Heat Map On The HTML Page (Classes Names Are Not Mandatory)
conf_mat_to_html(conf_mat=cm, classes_names=[
    'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10'], detail=False)

Output

[[9, 12, 11, 8, 10, 10, 7, 6, 11, 9], [12, 9, 12, 9, 7, 3, 16, 7, 7, 11], [7, 10, 25, 14, 5, 14, 9, 11, 6, 12], [7, 15, 9, 11, 13, 13, 4, 7, 10, 10], [12, 10, 11, 3, 14, 6, 8, 19, 6, 15], [5, 14, 13, 17, 9, 8, 8, 7, 11, 17], [7, 10, 10, 10, 6, 9, 10, 4, 9, 11], [8, 9, 11, 7, 11, 11, 15, 9, 13, 12], [12, 12, 9, 6, 11, 7, 10, 13, 7, 10], [11, 5, 9, 13, 8, 14, 3, 9, 15, 13]]

Note

These outputs are for the calc_conf_mat and print_conf_mat functions only, in both cases. I'll leave it to you to figure out the last two functions plot_conf_mat and conf_mat_to_html on your own.

You can call all the functions with the camelCase format.

License

This project is licensed under the MIT LICENSE - see the LICENSE for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conf-mat-1.0.4.tar.gz (21.2 kB view hashes)

Uploaded Source

Built Distribution

conf_mat-1.0.4-py3-none-any.whl (15.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page