what should be the program for following output?

1 view (last 30 days)
Sr.no Threshold TP TN FP FN FAR FRR GAR
1 0 0 100 0 100 0 1 0
2 0.1 19 100 0 81 0 0.81 19
3 0.15 62 99 1 38 0.01 0.38 62
4 0.2 81 94 6 19 0.06 0.19 81
5 0.25 95 54 46 5 0.46 0.05 95
6 0.3 99 30 70 1 0.7 0.01 99
7 0.4 100 21 79 0 0.79 0 100
8 0.5 100 3 97 0 0.97 0 100
9 0.55 100 0 100 0 1 0 100
10 0.6 100 0 100 0 1 0 100
11 0.7 100 0 100 0 1 0 100
12 0.8 100 0 100 0 1 0 100
13 0.9 100 0 100 0 1 0 100
14 1 100 0 100 0 1 0 100

Answers (1)

Andrei Bobrov
Andrei Bobrov on 12 Sep 2018
>> a0 = {'Sr_no' 'Threshold' 'TP' 'TN' 'FP' 'FN' 'FAR' 'FRR' 'GAR'};
a=[1 0 0 100 0 100 0 1 0
2 0.1 19 100 0 81 0 0.81 19
3 0.15 62 99 1 38 0.01 0.38 62
4 0.2 81 94 6 19 0.06 0.19 81
5 0.25 95 54 46 5 0.46 0.05 95
6 0.3 99 30 70 1 0.7 0.01 99
7 0.4 100 21 79 0 0.79 0 100
8 0.5 100 3 97 0 0.97 0 100
9 0.55 100 0 100 0 1 0 100
10 0.6 100 0 100 0 1 0 100
11 0.7 100 0 100 0 1 0 100
12 0.8 100 0 100 0 1 0 100
13 0.9 100 0 100 0 1 0 100
14 1 100 0 100 0 1 0 100];
>> T = array2table(a,'v',a0)
  1 Comment
Balaji M. Sontakke
Balaji M. Sontakke on 12 Sep 2018
sir, actually am having multiclass confusion matrix(see following table ), I want to convert this matrix into above table which calculates threshold TP TN FP FN like that) TruePositive FalsePositive FalseNegative TrueNegative ____________ _____________ _____________ ____________ Actual_class1 4 1 0 395 Actual_class2 4 0 0 396 Actual_class3 4 0 0 396 Actual_class4 4 0 0 396 Actual_class5 4 0 0 396 Actual_class6 4 0 0 396 Actual_class7 4 0 0 396 Actual_class8 4 0 0 396 Actual_class9 4 0 0 396 Actual_class10 3 0 1 396 Actual_class11 4 0 0 396 Actual_class12 3 0 1 396 Actual_class13 4 0 0 396 Actual_class14 4 0 0 396 Actual_class15 4 1 0 395 Actual_class16 4 0 0 396 Actual_class17 4 1 0 395 Actual_class18 4 0 0 396 Actual_class19 4 0 0 396 Actual_class20 4 0 0 396 Actual_class21 4 0 0 396 Actual_class22 4 0 0 396 Actual_class23 4 0 0 396 Actual_class24 2 0 2 396 Actual_class25 4 0 0 396 Actual_class26 4 0 0 396 Actual_class27 4 0 0 396 Actual_class28 4 0 0 396 Actual_class29 3 0 1 396 Actual_class30 4 1 0 395 Actual_class31 4 1 0 395 Actual_class32 4 1 0 395 Actual_class33 4 0 0 396 Actual_class34 4 0 0 396 Actual_class35 4 0 0 396 Actual_class36 3 0 1 396 Actual_class37 4 0 0 396 Actual_class38 4 0 0 396 Actual_class39 4 1 0 395 Actual_class40 4 1 0 395 Actual_class41 4 0 0 396 Actual_class42 3 1 1 395 Actual_class43 4 0 0 396 Actual_class44 4 0 0 396 Actual_class45 4 0 0 396 Actual_class46 4 0 0 396 Actual_class47 4 0 0 396 Actual_class48 4 0 0 396 Actual_class49 3 0 1 396 Actual_class50 4 0 0 396 Actual_class51 4 0 0 396 Actual_class52 4 0 0 396 Actual_class53 3 0 1 396 Actual_class54 4 0 0 396 Actual_class55 4 0 0 396 Actual_class56 4 0 0 396 Actual_class57 3 0 1 396 Actual_class58 4 0 0 396 Actual_class59 4 0 0 396 Actual_class60 3 0 1 396 Actual_class61 4 0 0 396 Actual_class62 4 1 0 395 Actual_class63 4 0 0 396 Actual_class64 4 0 0 396 Actual_class65 4 0 0 396 Actual_class66 4 0 0 396 Actual_class67 4 0 0 396 Actual_class68 4 0 0 396 Actual_class69 4 0 0 396 Actual_class70 4 0 0 396 Actual_class71 4 0 0 396 Actual_class72 4 0 0 396 Actual_class73 4 0 0 396 Actual_class74 4 1 0 395 Actual_class75 4 0 0 396 Actual_class76 4 0 0 396 Actual_class77 4 0 0 396 Actual_class78 3 0 1 396 Actual_class79 4 0 0 396 Actual_class80 4 0 0 396 Actual_class81 4 0 0 396 Actual_class82 4 0 0 396 Actual_class83 4 0 0 396 Actual_class84 4 0 0 396 Actual_class85 4 0 0 396 Actual_class86 4 0 0 396 Actual_class87 4 0 0 396 Actual_class88 4 0 0 396 Actual_class89 4 1 0 395 Actual_class90 4 0 0 396 Actual_class91 4 0 0 396 Actual_class92 4 0 0 396 Actual_class93 4 0 0 396 Actual_class94 4 0 0 396 Actual_class95 4 0 0 396 Actual_class96 4 0 0 396 Actual_class97 4 0 0 396 Actual_class98 4 0 0 396 Actual_class99 4 0 0 396 Actual_class100 4 0 0 396

Sign in to comment.

Categories

Find more on Numeric Types in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!