[Webinar] Streamline your web hosting managementRegister Today

x
Solved

# Confusion Matrix

Posted on 2003-03-03
Medium Priority
439 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

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
###### Suggested Courses
Course of the Month7 days, 20 hours left to enroll