how to manually adjust threshold value in PERFCURVE(​LABELS,SCO​RES,POSCLA​SS)

조회 수: 4 (최근 30일)
I have 100 subjects, I used KNN classifier for classification, when i use perfcurve function for roc it automatically displays result, the question in my mind is how and where to adjust threshold values in perfcurve that causes on result.
  댓글 수: 4
Balaji M. Sontakke
Balaji M. Sontakke 2020년 3월 3일
Sir, as you said "You can then choose the optimal value of T from this array based on your needs.", But in my perfcurve, I get 11 values start from 1,2,3......10.
many questions are comes in mind regarding this threshold, I will ask one by one here...
1) How the researchers get threshold like in following table but in my result only I get threshold like 1,2,3....10
Threshold FAR (%) FRR (%) EER (%) GAR (%)
0.1 15.61 42.06 28.84 71.15
0.13 20.30 22.66 21.48 78.51
0.2 31.23 8.73 19.98 80.01
0.3 46.85 2.93 24.89 75.10
0.4 62.46 2 32.23 67.76
0.5 78.08 1.4 39.74 60.25
Following is the result of my program...
Confusion matrix
4 0 0 0 0 0 0 0 0 0
0 3 0 0 0 0 0 1 0 0
1 1 0 0 0 1 0 0 1 0
0 1 1 2 0 0 0 0 0 0
0 0 0 1 1 0 0 0 1 1
1 0 0 0 0 0 1 2 0 0
2 0 0 0 0 0 2 0 0 0
1 0 0 0 0 1 0 2 0 0
1 0 0 1 0 0 0 0 2 0
0 1 2 0 0 0 0 0 0 1
Total Instance = 40
class1==>1
class2==>2
class3==>3
class4==>4
class5==>5
class6==>6
class7==>7
class8==>8
class9==>9
class10==>10
Multi-Class Confusion Matrix Output
TruePositive FalsePositive FalseNegative TrueNegative
____________ _____________ _____________ ____________
Actual_class1 4 6 0 30
Actual_class2 3 3 1 33
Actual_class3 0 3 4 33
Actual_class4 2 2 2 34
Actual_class5 1 0 3 36
Actual_class6 0 2 4 34
Actual_class7 2 1 2 35
Actual_class8 2 3 2 33
Actual_class9 2 2 2 34
Actual_class10 1 1 3 35
Overall values
Accuracy: 0.4250
Error: 0.5750
Sensitivity: 0.4250
Specificity: 0.9361
Precision: 0.4467
FalsePositiveRate: 0.0639
F1_score: NaN
MatthewsCorrelationCoefficient: 0.3900
Kappa: 0.6870
Tbl =
11×3 table
FPR TPR Thr
_______ ___ ___
0 0 10
0.13333 0 10
0.23333 0.1 9
0.33333 0.2 8
0.4 0.4 7
0.5 0.5 6
0.63333 0.5 5
0.76667 0.5 4
0.86667 0.6 3
1 0.6 2
1 1 1
Mohammad Sami
Mohammad Sami 2020년 3월 5일
Use the roc function for the multiclass problem.
An example is shown in the documentation.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by