How to compute the AUC (Area under Curve) when using the function
[tpr,fpr,thresholds] = roc(targets,outputs)
plot(fpr,tpr)

 Akzeptierte Antwort

Askic V
Askic V am 9 Mär. 2023
Bearbeitet: Askic V am 9 Mär. 2023

1 Stimme

I think this would be a correct way to do so, but I'm not 100% sure. It seems correct from the ROC diagrams:
[x,t] = iris_dataset;
net = patternnet(10);
net = train(net,x,t);
y = net(x);
[tpr,fpr,th] = roc(t,y);
plotroc(t, y)
auc_1 = 1-trapz(tpr{1}, fpr{1});
auc_2 = 1-trapz(tpr{2}, fpr{2});
auc_3 = 1-trapz(tpr{3}, fpr{3});

Weitere Antworten (0)

Kategorien

Mehr zu Food Sciences finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 9 Mär. 2023

Bearbeitet:

am 9 Mär. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by