MATLAB Answers

Change Support Vector Machine model without false positive

2 views (last 30 days)
Peter van 't Ooster
Peter van 't Ooster on 20 Jan 2020
Edited: Peter van 't Ooster on 20 Jan 2020
Hi,
We are working on a project with a dataset with EEG data, with 44 extracted features. For clinical relevance, it is necessary to adjust the model with 100% specificity. We are wondering how to adjust the SVM-model, so the false positives are equal to zero. The specificity needs to be enhanced at the expense of the sensitivity. Anyone who can help?
load('data_workspace')
%% load
pred = data12_num(1:end,2:45);
resp = data12_num(1:end,1);
resp = logical(resp);
%% SVM
mdlSVM = fitcsvm(pred,resp,'Standardize',true);
mdlSVM = fitPosterior(mdlSVM);
[~,score_svm] = resubPredict(mdlSVM);
[Xsvm,Ysvm,Tsvm,AUCsvm,OPTROCPT] = perfcurve(resp,score_svm(:,mdlSVM.ClassNames),'true');
%% Plot
plot(Xsvm,Ysvm)
xlabel('False positive rate'); ylabel('True positive rate');
title('ROC Curve for SVM Classification')
AUCsvm % determine the Area Under the Curve

  0 Comments

Sign in to comment.

Answers (0)

Sign in to answer this question.

Tags