Solved

# Confusion Matrix

Posted on 2003-03-03
Medium Priority
426 Views
How would I read in a data file to create a confusion matrix so that I can then extract data from it, like say kappa statistics? I know how to read in files but wonder how to create a confusion matrix. Thanks!
0
Question by:Trinity2000
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 14

Expert Comment

ID: 8059000
Please explain. Creating a matrix is not a problem. I do not know how a confusion matrix is different (in terms of being a matrix) from a regular matrix.
0

Author Comment

ID: 8059409
The confusion reads in a file which lists predictions of occurance against actual occurance and displays them in a grid like so:

True Positive, False Positive

False Negative, True Negative

True Positive is a true prediction that a population occurance will be found, False positive is a false prediction that an occurance will be found, False negative is a false prediction that an occurance will not be found, and true negative is a true prediction that an occurance will not be found. The file it reads is structured like so:

ID Occurance (1 or 0) Prediction
so it would be like:

1  1  0.5
2  0  0.25
3  1  0.75

etc.

For area 1, an occurance was found and there was a 50% probability that one would be found.

For area 2, no occurance was found and there was only a 25% probablity that one would be found, or a 75% chance that one would not be found.

For area 3, an occurance was found and there was a 75% chance of finding one, or only a 25% of not finding one.

This kind of thing is used in neural networks and I have actually seen a fortran program that can alleges to do it though was unable to get that working. I think there is a class in Java called ConfusionMatrix but haven't yet stumbled across an example of how to implement it. Statistics can be generated from the numbers in the matrix-that part isn't difficult if one has the equations but it is the matrix itself that is a bit of a question. Any thoughts would be greatly appreciated!
0

LVL 14

Expert Comment

ID: 8059602
Since I am not completely familiar with the problem domain, I am not sure that my advice would be valuable to you.

http://www.cs.waikato.ac.nz/~ml/weka/

0

Author Comment

ID: 8059644
Thanks! I'll take a look.
0

LVL 14

Accepted Solution

Tommy Braas earned 800 total points
ID: 8073575
0

Author Comment

ID: 8075683
Yeah, thanks- there is a whole set of classes there for AI kind of stuff so am looking thru that.
0

Expert Comment

ID: 9058957
Trinity2000:
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

LVL 35

Expert Comment

ID: 9721279
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

TimYates
EE Cleanup Volunteer
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correctâ€¦
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used byâ€¦
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
###### Suggested Courses
Course of the Month9 days, 23 hours left to enroll