The length of the list in verticalClasses equals classificationMatrix.rows, and the length of the list in horizontalClasses equals classificationMatrix.columns.
An error (or misclassification) matrix may be given a title. The class names corresponding to the rows and typically listed down the left side of the matrix are the verticalClasses. The class names corresponding to the columns and typically listed across the top of the matrix are the horizontalClasses. The matrix may be the original matrix in which case integer values are used. The column and row for each position in the matrix indicate respectively the actual class of a number of observations and the class to which those observations were assigned by a given classification procedure. The matrix may not be square if (i) a row (usually the bottom row) is defined as values for the NULL class, or if (ii), classes are grouped or amalgamated on one dimension relative to the other. If the matrix has been normalized, it must be square and the values are defined as instances of a type of Real (in Measure).