N
The Daily Insight

How is ROC curve generated?

Author

Michael Gray

Updated on April 05, 2026

The ROC curve is produced by calculating and plotting the true positive rate against the false positive rate for a single classifier at a variety of thresholds. For example, in logistic regression, the threshold would be the predicted probability of an observation belonging to the positive class.

What is ROC in Weka?

What we want to measure is the area under the curve. It’s called an ROC, “Receiver Operating Characteristic”, curve, for historical reasons. Weka prints out the area under the ROC curve. In this case it’s 0.5778.

How do you make a ROC curve from scratch?

ROC Curve in Machine Learning with Python

  1. Step 1: Import the roc python libraries and use roc_curve() to get the threshold, TPR, and FPR.
  2. Step 2: For AUC use roc_auc_score() python function for ROC.
  3. Step 3: Plot the ROC curve.
  4. Step 4: Print the predicted probabilities of class 1 (malignant cancer)

Where is AUC Weka?

Under the ROC Curve
AUC = the Area Under the ROC Curve. Weka uses the Mann Whitney statistic to calculate the AUC via the weka.

What is ROC curve?

An ROC curve (receiver operating characteristic curve) is a graph showing the performance of a classification model at all classification thresholds. This curve plots two parameters: True Positive Rate. False Positive Rate.

What is the ROC curve used for?

ROC curves are frequently used to show in a graphical way the connection/trade-off between clinical sensitivity and specificity for every possible cut-off for a test or a combination of tests. In addition the area under the ROC curve gives an idea about the benefit of using the test(s) in question.

How do you plot two or more ROC curves on the same graph?

How to plot two or more ROC curves on the same graph.

  1. Go to the first ROC graph.
  2. Double click to bring up the Format Graph dialog.
  3. Go to the middle tab.
  4. Click Add to add a data set to the graph, and pick the appropriate data set (the “ROC Curve” page of the appropriate ROC analysis.
  5. Repeat as necessary.

What is ROC in data mining?

An ROC curve (receiver operating characteristic curve) is a graph showing the performance of a classification model at all classification thresholds.

How do you generate a ROC curve in Python?

How to plot a ROC Curve in Python?

  1. Step 1 – Import the library – GridSearchCv.
  2. Step 2 – Setup the Data.
  3. Step 3 – Spliting the data and Training the model.
  4. Step 5 – Using the models on test dataset.
  5. Step 6 – Creating False and True Positive Rates and printing Scores.
  6. Step 7 – Ploting ROC Curves.

What is threshold in Weka?

For example, the typical threshold value of 0.5 means the predicted probability of “positive” must be higher than 0.5 for the instance to be predicted as “positive”. Weka just varies the threshold on the class probability estimates in each case.

What is ROC curve used for?