When solving a machine learning classification problem, a confusion matrix (a.k.a error matrix) is a table which allows visualization and understanding of the performance of an algorithm. Each row of the matrix represents the instances in a predicted class, while each column represents the instances in an actual class. The name comes from the idea that this matrix shows if the model confuses two classes.