title: What is the difference between a Confusion Matrix and Contingency Table?
body: <p>I'm writting a piece of code to evaluate my Clustering Algorithm and I find that every kind of evaluation method needs the basic data from a <code>m*n</code> matrix like <code>A = {aij}</code> where <code>aij</code> is the number of data points that are members of class <code>ci</code> and elements of cluster <code>kj</code>.</p>
  
  <p>But there appear to be two of this type of matrix in <em>Introduction to Data Mining</em> (Pang-Ning Tan et al.), one is the Confusion Matrix, the other is the Contingency Table. I do not fully understand the difference between the two. Which best describes the matrix I want to use?</p>