![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1318790/image.png)
How to compute the AUC (Area Under Curve)?
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
How to compute the AUC (Area under Curve) when using the function
[tpr,fpr,thresholds] = roc(targets,outputs)
plot(fpr,tpr)
0 Commenti
Risposta accettata
Askic V
il 9 Mar 2023
Modificato: Askic V
il 9 Mar 2023
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});
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1318790/image.png)
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Define Shallow Neural Network Architectures in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!