International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 186 - Number 50 |
Year of Publication: 2024 |
Authors: Ahmad Farhan AlShammari |
10.5120/ijca2024924236 |
Ahmad Farhan AlShammari . Implementation of Model Evaluation using Confusion Matrix in Python. International Journal of Computer Applications. 186, 50 ( Nov 2024), 42-48. DOI=10.5120/ijca2024924236
The goal of this research is to develop a model evaluation program using confusion matrix in Python. Model evaluation is used to measure the performance of the applied model by comparing the predicted data with the actual data. Confusion matrix is used to summarize the predictions of the applied model and compute the evaluation metrics. The basic steps of model evaluation using confusion matrix are explained: preparing data (actual and predicted), computing confusion matrix, computing totals (sum of items, diagonal, rows, and columns), computing evaluation metrics (accuracy, precision, recall, and F1-score), printing evaluation metrics, and plotting confusion matrix. The developed program was tested on an experimental dataset. The program successfully performed the basic steps of model evaluation using confusion matrix and provided the required results.