Page 232 - AI Ver 3.0 class 10_Flipbook
P. 232

Build the Confusion Matrix

              To build the confusion matrix, we manually compare the predicted labels with the actual labels and categorise the
              results into True Positives, True Negatives, False Positives, and False Negatives.
              For example, predicting the possibility of snowfall. Here, Yes would mean there will be snowfall, and No would
              mean that there will be no snowfall. So, the AI model will have output as Yes or No.
              The following table shows the actual values and the predicted values:


                                                Predicted Value        Actual Value

                                                      Yes                   Yes

                                                      No                    Yes

                                                      Yes                   No

                                                      No                    No

                                                      Yes                   Yes

                                                      Yes                   No

                                                      No                    Yes

                                                      Yes                   Yes

                                                      No                    No

                                                      No                    No


              Let’s fill the given matrix based on the table given here.


                                                                        Predicted
                                                Confusion Matrix
                                                                      Yes       No

                                                            Yes
                                                Actual
                                                            No


              Steps to Fill in the Confusion Matrix

                 • Count the number of rows having Yes in both the columns of the table and put the count of it in the top left cell.

                 • Similarly, the number of rows having Yes in the Actual Value column and No in the Predicted Value column
                 will be shown in 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.




                    230     Touchpad Artificial Intelligence (Ver. 3.0)-X
   227   228   229   230   231   232   233   234   235   236   237