[Webinar] Streamline your web hosting managementRegister Today


Confusion Matrix

Posted on 2003-03-03
Medium Priority
Last Modified: 2008-02-01
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!
Question by:Trinity2000
LVL 14

Expert Comment

by:Tommy Braas
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.

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


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!
LVL 14

Expert Comment

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

However, maybe this link can help you:


The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.


Author Comment

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

Accepted Solution

Tommy Braas earned 800 total points
ID: 8073575
Did it help you solve the problem?

Author Comment

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

Expert Comment

ID: 9058957
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
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:

Accept orangehead911's comment as answer.

Please leave any comments here within the next seven days.


EE Cleanup Volunteer

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

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

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question