AI Dictionary › Fondamenti AI
Curva ROC e AUC
The ROC curve is a plot showing how a binary classifier's performance changes as the decision threshold used to separate positive from negative cases varies, relating the model's ability to identify true positives to its tendency to generate false alarms. AUC, the area under that curve, summarizes the whole plot in a single number between 0 and 1, indicating how good the model is at distinguishing the two classes regardless of the chosen threshold.
The ROC curve is a plot showing how a binary classifier's performance changes as the decision threshold used to separate positive from negative cases varies, relating the model's ability to identify true positives to its tendency to generate false alarms. AUC, the area under that curve, summarizes the whole plot in a single number between 0 and 1, indicating how good the model is at distinguishing the two classes regardless of the chosen threshold.
A classification model does not directly produce a label, but a probability or score, and a threshold is needed to turn it into a binary decision. The ROC curve plots, for every possible threshold, the true positive rate on the vertical axis and the false positive rate on the horizontal axis: a perfect model touches the top-left corner, a model guessing at random traces a diagonal line, and a good model gets as close as possible to the corner. An AUC of 0.5 indicates performance equivalent to a coin flip, an AUC of 1 indicates perfect separation between classes.
It is especially useful because it does not require fixing a specific threshold in advance, and it allows different models to be compared on their intrinsic ability to discriminate between classes, regardless of how they will later be calibrated in production. It is widely used in medical diagnostics, where the method's origins trace back to radar signal analysis during World War II, in fraud detection, and in any scoring system where the trade-off between sensitivity and false alarms must be set.
The acronym ROC stands for receiver operating characteristic, an expression born in radar signal processing during the 1940s, used to evaluate how well a radar operator could distinguish a real enemy target from background noise. The method migrated to experimental psychology and medical diagnostics in the 1960s and 70s, before becoming an established standard for evaluating machine learning classifiers starting in the 1980s and 90s.
La curva ROC è un grafico che mostra come cambiano le prestazioni di un classificatore binario al variare della soglia di decisione usata per separare i casi positivi da quelli negativi, mettendo in relazione la capacità del modello di individuare i veri positivi con la sua tendenza a generare falsi allarmi. L'AUC, l'area sotto quella curva, riassume tutto il grafico in un unico numero compreso tra 0 e 1, che indica quanto il modello è bravo a distinguere le due classi indipendentemente dalla soglia scelta.
Un modello di classificazione non produce direttamente un'etichetta, ma una probabilità o un punteggio, e serve una soglia per trasformarlo in una decisione binaria. La curva ROC traccia, per ogni possibile soglia, il tasso di veri positivi sull'asse verticale e il tasso di falsi positivi sull'asse orizzontale: un modello perfetto tocca l'angolo in alto a sinistra, un modello che indovina a caso traccia una linea diagonale, e un buon modello si avvicina il più possibile all'angolo. Un AUC pari a 0,5 indica prestazioni equivalenti al lancio di una moneta, un AUC pari a 1 indica separazione perfetta tra le classi.
È particolarmente utile perché non richiede di fissare in anticipo una soglia specifica, e permette di confrontare modelli diversi sulla loro capacità intrinseca di discriminare tra classi, indipendentemente da come verranno poi calibrati in produzione. È molto usata in diagnostica medica, dove le origini del metodo risalgono all'analisi dei segnali radar durante la Seconda guerra mondiale, in rilevamento frodi e in ogni sistema di scoring dove serve decidere dove posizionare il compromesso tra sensibilità e falsi allarmi.
L'acronimo ROC sta per receiver operating characteristic, curva caratteristica del ricevitore, un'espressione che nasce nell'ambito dell'elaborazione dei segnali radar durante gli anni '40, per valutare quanto un operatore radar riuscisse a distinguere un vero bersaglio nemico dal rumore di fondo. Il metodo migrò alla psicologia sperimentale e alla diagnostica medica negli anni '60 e '70, per poi diventare uno standard consolidato nella valutazione dei classificatori di machine learning a partire dagli anni '80 e '90.
From our network
Magellano GPS — Fleet Tracking Made Simple
Real-time GPS tracking, remote engine lock, fuel and CO₂ reporting for your fleet.
Visit magellanogps.com →From the Agora Intelligence blog
📱 Download the Android app (beta) iOS coming soon
Say what you mean. Get what you need.
Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.