Page 151 - Ai_C10_Flipbook
P. 151

Steps to Fill in the Confusion Matrix

                    • Count the number of rows having Yes in both the columns of the                      Predicted
                                                                                  Confusion Matrix
                   table and put the count of it in the top left cell.                                  Yes        No
                    • Similarly, the number of rows having Yes in the Actual Value            Yes        3         2
                   column and No in the Predicted Value column will be shown in    Actual
                                                                                               No        2         3
                   the top right cell of the confusion matrix.
                    • Number of rows having No in the Actual Value and Yes in the Predicted Value column will be shown in the
                   down left cell of the confusion matrix.
                    • Lastly, the number of rows having No in the both columns will be shown in the down right cell of confusion
                   matrix.
                 So, the final Confusion matrix will be as follows:
                 Here, the total number of correct predictions are 6 out of 10

                 The classification outcomes based on the different values of actual and predicted labels are as follows:
                    • True Positive
                    • True Negative
                    • False Positive
                    • False Negative

                 True Positive


                 A True Positive occurs when a model correctly predicts a positive
                                                                                                         Predicted
                 outcome. In the above example, the value of the True Positive is   Confusion Matrix
                 depicted in the shaded region.                                                         Yes       No

                 Some more examples of True Positive are as follows:                          Yes        3         2
                                                                                  Actual
                    • Medical  Diagnosis  -  A  machine  learning  model  predicts
                                                                                              No         2         3
                   whether the patient has asthma.
                   True Positive: The model predicts that the patient actually has asthma.
                    • Face Recognition Security System - A security system identifies individuals who are authorised to enter a
                   restricted area.
                   True Positive: The system recognises an authorized employee correctly.

                 True Negative


                 A  True  Negative  occurs  when  a  model  correctly  predicts  a
                                                                                                          Predicted
                 negative outcome. When the model’s negative prediction is same   Confusion Matrix
                 as the actual outcome, it’s the case of True Negative. In the given                    Yes       No
                 example the shaded region depicts the True Negative scenario.                Yes        3         2
                                                                                  Actual
                 Some more examples of True Negative are as follows:
                                                                                              No         2         3
                    • Spam Detection - The model predicts an email is “Not Spam”.
                   True Negative is when an email is indeed not spam.
                    • Loan Default Prediction - The model predicts a customer will not default, in payment of loan instalment on time.
                   True Negative is the customer paid and did not default.





                                                                                           Evaluating Models    149
   146   147   148   149   150   151   152   153   154   155   156