Interpreting the SQL Server Analysis Services Classification Matrix

By:   |   Comments (1)   |   Related: > Analysis Services Development


Problem

The Classification Matrix is found in the Mining Accuracy Chart section of the SQL Server Analysis Services Mining Structure object within Visual Studio. Classification matrices are also known as confusion matrices because they are showing the confusion a classification algorithm has in determining which class label to place on a given record. What do the numbers in the SQL Server Analysis Services Classification Matrix represent?

Solution

In this tip, the numbers in the classification matrix for a binary classifier are explained.

Binary classifiers attempt to categorize data into one of two categories such as True/False, Yes/No, Y/N or Positive/Negative. The numbers in the classification matrix show the counts of true positives, true negatives, false positives and false negatives. For this tip, we will use the class labels of "positive" and "negative" to help simplify the explanation.

The classification matrix in SQL Server Analysis Services lists the predicted values on the rows with the actual values in the columns. In the figure below, the true positive count is highlighted. True positives are when the predicted positive class label equals the actual positive class label. In other words, the algorithm has made a correct prediction that a particular tuple is positive.

True positives

The image below highlights the true negative count. True negatives are when the predicted negative class label equals the actual negative class label. In other words, the algorithm has made a correct prediction that a particular tuple is negative.

True negatives

The next two figures get a little interesting because we are highlighting the counts for when the algorithm has made an incorrect prediction. The image below shows the false negative count. The algorithm has predicted 221 negative tuples while the actual data is positive.

False negatives

This same algorithm has made 204 false positive predictions. False positives are when the predicted value is positive, but the actual value is negative.

False Positives
Next Steps

False positives and false negatives do occur. The goal of classification is to maximize true positives and true negative counts while not causing the model to overfit the data to the point where the model cannot accurately predict previously unseen records.

Check out these other tips on data mining in SQL Server Analysis Services.



sql server categories

sql server webinars

subscribe to mssqltips

sql server tutorials

sql server white papers

next tip



About the author
MSSQLTips author Dallas Snider Dr. Dallas Snider is an Assistant Professor in the Computer Science Department at the University of West Florida and has 18+ years of SQL experience.

This author pledges the content of this article is based on professional experience and not AI generated.

View all my tips



Comments For This Article




Friday, January 22, 2016 - 2:27:22 AM - Alfred Back To Top (40470)

 

 good tip















get free sql tips
agree to terms