Definitions for **"Confusion matrix"**

a matrix showing the predicted and actual classifications

Measures the correctness of predictions made by a model. The row indexes of a confusion matrix correspond to actual values observed and used for model building; the column indexes correspond to predicted values produced by applying the model. For any pair of actual/predicted indexes, the value indicates the number of records classified in that pairing. cost matrix A two-dimensional, by table that defines the cost associated with a prediction versus the actual value. A cost matrix is typically used in classification models, where is the number of distinct values in the target, and the columns and rows are labeled with target values.

Measures the correctness of predictions made by a model from a test task. The row indexes of a confusion matrix correspond to actual values observed and provided in the test data. These were used for model building. The column indexes correspond to predicted values produced by applying the model to the test data. For any pair of actual/predicted indexes, the value indicates the number of records classified in that pairing. When predicted value equals actual value, the model produces correct predictions. All other entries indicate errors.