Answers.Body: <p>You cannot see overfitting in this curve, because to evaluate overfitting, you need to have training and validation losses, and a ROC curve does not present that.</p>
  <p>The only informationn you can obtain from this curve is that for your dataset, a random forest is better classifier than KNN or logistic regression, nothing more.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-12T17:49:11.927Z
Answers.LastActivityDate: 2022-11-12T17:49:11.927Z
Answers.UserDisplayName: Dr. Snoopy
Answers.Body: <p>The <a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic" rel="nofollow noreferrer">Receiver Operating Characteristic (ROC) Curve</a> that you are showing helps in evaluating and comparing the performance at binary classification of machine learning models (see <a href="https://scikit-learn.org/stable/modules/model_evaluation.html#roc-metrics" rel="nofollow noreferrer">article</a>).  For different thresholds (not shown) of the model's output probability of the positive class, the ROC curve shows the Sensitivity (True Positive Rate) vs. 1-Specificity (False Positive Rate) for the binary classification task.  Thus, you can see how changing the threshold changes the Sensitivity and Specificity.  Generally, setting the threshold low results in high Sensitivity and low Specificity.  As the threshold is increased, the Sensitivity decreases and Specificity increases.</p>
  <p>The area under the ROC curve (AUC) is a measure of how well the model performs.  If the model were presented with all possible pairs of positive and negative examples from your dataset, the AUC is the proportion of pairs that the model would correctly identify which is which.  The maximum value that AUC can have is 1, and this is the AUC a &quot;perfect&quot; classifier would have.  The diagonal line indicates the performance of a naïve model (<a href="https://scikit-learn.org/stable/modules/generated/sklearn.dummy.DummyClassifier.html" rel="nofollow noreferrer">a dummy classifier</a>) that predicts randomly, and as such, the AUC for the diagonal is 0.5 (i.e., coin flip).  Therefore, in your example, the Logistic Regression model has the best performance and the Random Forrest model has the worst performance.</p>
  <p>You only have the ROC curves for the test set.  If you had the same for the training set, then you would be able to compare the AUC (i.e., a measure of model performance) on both the training and test sets and be able to evaluate for overfitting (or underfitting).  For example, the model performing well on the training data (high AUC) but poorly on the test data (low AUC) would be an indication of overfitting.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-12T12:08:22.213Z
Answers.LastActivityDate: 2022-11-13T05:20:38.497Z
Answers.LastEditDate: 2022-11-13T05:20:38.497Z
Answers.UserDisplayName: Snehal Patel
Body: <p>Hi i got the following roc curve:</p>
  <p><a href="https://i.sstatic.net/MsLaJ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MsLaJ.png" alt="enter image description here" /></a></p>
  <p>What does this mean? has this to do with overfitting? Is my data wrong preprocessed?</p>
  <p>i do not understand and would appreciate an answer.</p>
  
Tags: <machine-learning>
Title: Interpretation of the roc curve on test set
UserDisplayName: ProgrammingBot
ThreadText: # Interpretation of the roc curve on test set
  
  (Asked by: username_0 on 2022-11-12)
  
  Hi i got the following roc curve:
  
  [![enter image description here](https://i.sstatic.net/MsLaJ.png)](https://i.sstatic.net/MsLaJ.png)
  
  What does this mean? has this to do with overfitting? Is my data wrong preprocessed?
  
  i do not understand and would appreciate an answer.
  
  **Tags:** machine-learning
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2022-11-12. Score: 1
  
  You cannot see overfitting in this curve, because to evaluate overfitting, you need to have training and validation losses, and a ROC curve does not present that.
  
  The only informationn you can obtain from this curve is that for your dataset, a random forest is better classifier than KNN or logistic regression, nothing more.
  
  
  ---
  
  ### Answer by username_2 on 2022-11-12. Score: 1
  
  The [Receiver Operating Characteristic (ROC) Curve](https://en.wikipedia.org/wiki/Receiver_operating_characteristic) that you are showing helps in evaluating and comparing the performance at binary classification of machine learning models (see [article](https://scikit-learn.org/stable/modules/model_evaluation.html#roc-metrics)). For different thresholds (not shown) of the model's output probability of the positive class, the ROC curve shows the Sensitivity (True Positive Rate) vs. 1-Specificity (False Positive Rate) for the binary classification task. Thus, you can see how changing the threshold changes the Sensitivity and Specificity. Generally, setting the threshold low results in high Sensitivity and low Specificity. As the threshold is increased, the Sensitivity decreases and Specificity increases.
  
  The area under the ROC curve (AUC) is a measure of how well the model performs. If the model were presented with all possible pairs of positive and negative examples from your dataset, the AUC is the proportion of pairs that the model would correctly identify which is which. The maximum value that AUC can have is 1, and this is the AUC a "perfect" classifier would have. The diagonal line indicates the performance of a naïve model ([a dummy classifier](https://scikit-learn.org/stable/modules/generated/sklearn.dummy.DummyClassifier.html)) that predicts randomly, and as such, the AUC for the diagonal is 0.5 (i.e., coin flip). Therefore, in your example, the Logistic Regression model has the best performance and the Random Forrest model has the worst performance.
  
  You only have the ROC curves for the test set. If you had the same for the training set, then you would be able to compare the AUC (i.e., a measure of model performance) on both the training and test sets and be able to evaluate for overfitting (or underfitting). For example, the model performing well on the training data (high AUC) but poorly on the test data (low AUC) would be an indication of overfitting.
  
  
  ---
  
  