How to obtain AUC for different sample sizes of training data and do comparisons with sensitivity and specificity?

3 ビュー (過去 30 日間)
Hello,
I need some urgent advice. WHen I have a SVM classifier implemented, I want to make conclusions from this by varying training and test sets. Is this a valid experiment to show the effect of sample size on sensitivity and specificity and accuracy.
First I tried to do 50% training and testing with cross validation, but due to random selection I iterated it 10 times so I could obtain an average. Then I obtained specificity values that varied so much and the AUC wasn't even correlating with it. How can I obtain a good comparison study.
here is what tried:
MyData=load ('My_69_Fotos.csv'); %# load iris dataset
labels=[1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;... 1;1;1;1;1;0;0;0;1;0;1;0;0;1;0;... 0;0;0;1;0;0;0;0;0;0;1;0;0;... 0;0;0;1;1;1;1;0;0;1;1;0;0;0;0;0;0;... 0;0;0;1;1;0];
amountExudates = MyData(:,1); %ATTRIBUTE1
total_area=MyData(:,2); %ATTRIBUTE2
densityRatio=MyData(:,3); %ATTRIBUTE3
gemiddeld=mean2(densityRatio);
standaard_afwyking=std2(densityRatio);
NormalizedArray =double( (densityRatio -gemiddeld) ./ standaard_afwyking);
GS = NormalizedArray ./ max(NormalizedArray(:))-min(NormalizedArray(:));
TrainVec=[amountExudates ,GS];
[train, test] = crossvalind('holdOut', 68, 0.75); %# get indices
cp = classperf( labels) ; %# init performance tracker
%# train an SVM model over training instances
svmModel = svmtrain(TrainVec(train,:), labels(train,:), ...
'Autoscale',true, 'Showplot',true, 'Method','QP', ...
'BoxConstraint',2e-1, 'Kernel_Function','rbf', 'RBF_Sigma',1);
%# test using test instances
pred = svmclassify(svmModel, TrainVec(test,:), 'Showplot',true);
TestingLabel=labels(test);
cp = classperf(cp, pred, test);
x=([GS,test]);
thresholds=3;
alpha=0.05; %significance level
verbose=1;
ROCout=roc(x,thresholds,alpha,verbose)

回答 (0 件)

カテゴリ

Help Center および File ExchangeROC - AUC についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by