matlab - find exact numbers of true postive in weka -


In WEKA, I can easily find the corrupt matrix TP rate and total truth classified examples I, but no precise view The way is the number of TP and / or TN?

And do you know any way to find these values ​​in matlab-anfis?

Since you mention MATLAB, I'm assuming that you are programming Vrka Library Are using to create classifier.

In that case, you can evaluate the class using the model, which provides all types of statistics. an example

Let's say you already have a weka.jar file on the Java class path (see javaaddpath View function), MATLAB here Is:

 % # data fname = 'C: \ program files \ weka-3-7 \ data \ iris.arff'; Loader = weka.core.converters.ArffLoader (); Loader.setFile (java.io.file (fName)); Data = loadergatedataSet (); Data.setClassIndex (data.numAttributes () - 1); % # Classifier Classifier = weka.classifiers.trees.J48 (); Classifier.setOptions (weka.core.Utils.splitOptions ('- 0.25-m2')); Classifier.buildClassifier (data); % # Evaluation evl = weka.classifiers.Evaluation (data); Pred = evl.evaluate model (classifier, data, {'}}); % # Display Disp (Clasifayrfosttstring ()) Div (EvlktoSummaryString ()) Div (evl.toClassDetailsString ()) disp (evl.toMatrixString ())% # confusion matrix and other statistics cm = evl.confusionMatrix (); The number of #% TP / TN / FP / FN in relation to class = 1 (iris-viricolor) tp = evl.numTruePositives (1); Tn = evl.numTrueNegatives (1); Fp = evl.numFalsePositives (1); Fn = evl.numFalseNegatives (1); % # Class = XX is a zero-based index, which adds maps for the following class values ​​classValues ​​= arrayfun (@ k) char (data.classAttribute.value (k-1)), ... 1: Data.classAttribute.numValues, 'Uniforms', Incorrect);   

Output:

  J48 cut tree ------------------ Petalwith & lt; = 0.6: Iris-Satosha (50.0) Petalwidth & gt; 0.6 | PetalWith & lt; = 1.7 | | Petolongand & lt; = 4.9: Iris-Vernicolor (48.0 / 1.0) | | Petal Lang & gt; 4.9 | | | PetalWith & lt; = 1.5: Iris-Virina (3.0) | | | PetalWith & gt; 1.5: Iris-Vernicolor (3.0 / 1.0) | PetalWith & gt; 1.7: Iris -Virginica (46.0 / 1.0) Number of leaves: Tree size: 9 Correctly categorized examples 147 98% False classified examples 3 2% Pocket Figures 0.97 Pisces absolute error 0.0233 Root mean squared error 0.108 Absolute relative Error 5.2482% Root relative squared error 22.9089% Coverage of cases (0.95 level) 98.6667% Size of mile relay area (0.95 level) 34% Number of total numbers 150 === Accurate purity by class === TP rate FP rate Esijn Recall F Measure MCC ROC area PRC area Class 1.000 0.000 1.000 1.000 1.000 1.000 1.000 1.000 iris-Setosa 0,980 0,020 0,961 0,961 0,961 0,955 0,990 iris-Warikolor 0,960 0,010 0,980 0,980 0,980 0,955 0,990 0,970 iris-Virginia weighted average 0,980 0,010 0,980 0,980 0,980 0,970 0.993 0.980 === Confusion Matrix === One BC & LT; - classified as 50 0 0 | A = Iris-Setosa 0 49 1b = Iris -Vericolor 0 2 48 | C = Iris-virginica    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

c# - Add Image in a stackpanel based on textbox input -

java - Reaching JTextField in a DocumentListener -