# ROC curve from an array of Confusion Matrices (true positive rates and false positive rates)

How can we create an ROC curve from an array of Confusion Matrices (true positive rates and false positive rates)?

• Do the confusion matrices correspond to various thresholds for classification?
– Dave
Jun 17 at 4:02

Let's say we have $$N$$ confusion-matrices for a binary classifier: $$C_{1}, C_{2}, ..., C_{N}$$ for corresponding classifier thresholds of monotonous sequences, $$t_{0} < t_{1} < ... < t_{N}$$ between 0 and 1.0, obtained on the fixed test set $$D$$. We can compute corresponding True Positive Rates $${\bf{TPR}} = [TPR_{1}, ..., TPR_{N}]$$ and False Positive Rates $${\bf{FPR}} = [FPR_{1}, ..., FPR_{N}]$$ from the confusion matrices.
The plot of $$\bf{TPR}$$ vs. $$\bf{FPR}$$ will give us the ROC curve. Ordering is not required but would be helpful in debugging any anomalies.