Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.353.948 Times

Confusion matrix / Matching matrix along with Precision, Sensitivity, Specificity and Model Accuracy 1.0

  Date Added: May 29, 2013  |  Visits: 305

Confusion matrix / Matching matrix along with Precision, Sensitivity, Specificity and Model Accuracy

Report Broken Link
Printer Friendly Version


Product Homepage
Download (39 downloads)



function [confmatrix] = cfmatrix2(actual, predict, classlist, per, printout)CFMATRIX2 calculates the confusion matrix for any prediction algorithm ( prediction algorithm generates a list of classes to which each test feature vector is assigned );Outputs:Confusion matrixAlso the TP, FP, FN and TN are output for each class based onhttp://en.wikipedia.org/wiki/Confusion_matrixThe Precision, Sensitivity and Specificity for each class have also been added in this update along with the overall accuracy of the model.% Further description of the outputs:%% True Postive [TP] = Condition Present + Positive result% False Positive [FP] = Condition absent + Positive result [Type I error]% False (invalid) Negative [FN] = Condition present + Negative result [Type II error]% True (accurate) Negative [TN] = Condition absent + Negative result% Precision(class) = TP(class) / ( TP(class) + FP(class) )% Sensitivity(class) = Recall(class) = TruePositiveRate(class)% = TP(class) / ( TP(class) + FN(class) )% Specificity ( mostly used in 2 class problems )=% TrueNegativeRate(class)% = TN(class) / ( TN(class) + FP(class) )%% Inputs:%% 1. actual / 2. predictThe inputs provided are the 'actual' classes vector and the 'predict'ed classes vector. The actual classes are the classes to which the input feature vectors belong. The predicted classes are the class to which the input feature vectors are predicted to belong to, based on a prediction algorithm. The length of actual class vector and the predicted class vector need to be the same. If they are not the same, an error message is displayed.% 3. classlistThe third input provides the list of all the classes {p,n,...} for which the classification is being done. All classes are numbers.% 4. per = 1/0 (default = 0)This parameter when set to 1 provides the values in the confusion matrix as percentages. The default provides the values in numbers.% 5. printout = 1/0 ( default = 1 )This parameter when set to 1 provides output on the matlab terminal and can be used to suppress output by setting to 0 ( default = 1 ). Assuming 'printout' of output use case would be more common and at the same time provided option to suppress output when the number of classes can be very large.% Example:% >> a = [ 1 2 3 1 2 3 1 1 2 3 2 1 1 2 3];% >> b = [ 1 2 3 1 2 3 1 1 1 2 2 1 2 1 3];% >> Cf = cfmatrix2(a, b, [1 2 3], 0, 1);% is equivalent to% >> Cf = cfmatrix2(a, b);% The values of classlist(unique from actual), per(0), printout(1) are set% to the respective defaults.%%% [Avinash Uppuluri: avinash_uv@yahoo.com: Last modified: 03/28/2012]% Changes added for 03/28/2012 upload% a. Pre-initialize confmatrix% b. Simplified logic making the code more readable and faster (based on comments from an interviewer who reviewed the code)% c. Provide input variable 'printout' as an option to suppress output to screen ( output to display is still the default (printout = 1) assuming that will be the more common use case ).% d. Added Precision(class), Sensitivity(class), Specificity(class) and the overall accuracy of model calculations

Requirements: No special requirements
Platforms: Matlab
Keyword: Assuming Cfmatrix Matlab Percentages Setting Suppress Terminal Values
Users rating: 0/10

License: Shareware Size: 10 KB
USER REVIEWS
More Reviews or Write Review


CONFUSION MATRIX / MATCHING MATRIX ALONG WITH PRECISION, SENSITIVITY, SPECIFICITY AND MODEL ACCURACY RELATED
Development Tools  -  Log Factorial of Large Positive Numbers 1.0
Matlab doesn't provide the values of n! when n>170, but this code can evaluate the logarithm of of n! with absolute accuracy of 1e-12 or better, and relative accuracy of 1e-15 or better. The following codes employ Stirling's integration formula of...
10 KB  
Development Tools  -  Data binding for MATLAB(R) GUI 1.0
Introduction of the new Object Oriented Programming capabilities makes it simple to bind MATLAB(R) variables together in a way that assures the synchronization of the variable values. This can be used to bind properties of MATLAB graphics objects...
10 KB  
Development Tools  -  Critical values for the Hampel identifier 1.0
Let X(1),X(2),...,X(N) be the ordered statistics of a sample X1,X2,...,XN from a normal distribution. LetM = median([X1,X2,...,XN]) and S = mad([X1,X2,..XN],1)/.6745 be robust stimators of (respectively) the mean and standard deviation of the...
10 KB  
Development Tools  -  Applications of MATLAB: Numerical Solutions 1.0
This is a collection of M-files used in the book "Applications of MATLAB: Numerical Solutions", ISBN 9957-32-040-8. by Yasin A. Al Shiboul . This collection comprises:- Examples that illustrate the text;- Programs developed within the text;-...
30.72 KB  
Libraries  -  Lingua::Phonology::Segment 0.32
Lingua::Phonology::Segment is a module to represent a segment as a bundle of feature values. SYNOPSIS use Lingua::Phonology; $phono = new Lingua::Phonology; # Define a feature set $features = $phono->features; $features->loadfile; #...
100.35 KB  
Libraries  -  App::Options 1.02
App::Options is Perl module to combine command line options, environment vars, and option file values (for program configuration). SYNOPSIS #!/usr/local/bin/perl use App::Options; # reads option values into %App::options by default # do...
33.79 KB  
Development Tools  -  A simple, physics based simulation of freefall - Version 1a 1.0
This is a simple free fall simulation. Time vs. height fallen, and time vs. velocity are plot. Also includes a small verification at the end, for the calculated values of terminal velocity against that obtained from v = u + at. Coming up in...
10 KB  
Programming  -  Config::GitLike 1.04
This module handles interaction with configuration files of the style used by the version control system Git. It can both parse and modify these files, as well as create entirely new ones. You only need to know a few things about the...
40.96 KB  
Development Tools  -  Import Tektronix Waveforms 1.0
TEKLOAD Helper function for loading saved waveform data Usage: dataStruct = tekload(filename,fileformat); filename is the full name of the file you want to load. fileformat is a string containing the format the file was save as:...
122.88 KB  
Modules  -  Phoca PDF 2.0.2
Phoca PDF is a Joomla! component. It enables you to set and create PDF documents in Joomla!.The whole Phoca PDF framework contains:* Phoca PDF component* Phoca PDF fonts* Phoca PDF pluginsSee more details...
10 KB  
NEW DOWNLOADS IN SCRIPTS, DEVELOPMENT TOOLS
Scripts  -  Freelancer Script 5.05
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Post projects. Featured projects. Private projects. Sealed projects. Edit/delete projects. Select freelancers....
5.49 MB  
Scripts  -  B2B Script 4.20
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Sign-up Account (Registration of account). Lead generation tools (for the sellers). Email verification to...
5.49 MB  
Scripts  -  B2C Script 5.06
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). The script comes with totally editable site colors, icons and graphics Multilevel categories allows extensive browsing Admin can change Category ordering or...
5.49 MB  
Scripts  -  Social Networking Script 2.86
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Registration with name, email, password, date of birth etc. User can add multiple school, college, university with start...
5.49 MB  
Scripts  -  Business Networking Script 8.04
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Ajax based interface. Profile creation. Different types of profile. Profile for jobseekers, employers and employed...
5.49 MB  
Development Tools  -  Aml2CHM 3.50
Those who use the popular Aml Pages text editor might be looking out for a way of generating help files from their text and notes. Aml2CHM is a plug-in that was developed to offer people a quick and efficient way of converting Aml Pages documents...
549.99 KB  
Development Tools  -  VMP Viewer 1.0
This is a very rudimentary tool to visualize the VMP files generated by BrainVoyager. Useful to share files with people who do not have BV.
10 KB  
Development Tools  -  Sending reports and timestamped file by emailing 1.0
main executing reference usage:[1] usage_send_mail.mIllustrates email sending with multiple separate files or single timestamped tar file. Attachment failure is properly handled, with continuation of report emailing without the attachment.[2]...
768 KB  
Development Tools  -  IrisMVC 2.0 rc1
IrisMVC is an OOP PHP framework that developers can use as a strong and secure foundation to build on various web applications following the Model-View-Controller (MVC) pattern. It provides the basic functionality developers need, without...
51.2 KB  
Development Tools  -  7-Zip for Script 4.42
7-Zip is a file archiver with a high compression ratio.Features:- High compression ratio in new 7z format with LZMA compression- Supported formats:- Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR- Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM,...
624.64 KB