# How to calculate TPR and FPR for different threshold values for classification model?

I have built a classification model to predict binary class. I can calculate precision, recall, and F1-Score. Now, I want to generate ROC for better understanding the classification performance of my classification model. I do not know how to calculate TPR and FPR for different threshold values.

3. Then set the different cutoff/threshold values on probability scores and calculate $$TPR= {TP \over (TP \ + \ FP)}$$ and $$FPR = {FP \over (FP \ + \ TN)}$$ for each threshold value.
The above answer calculates TPR incorrectly. It should be $$TPR = {TP \over (TP \ + \ FN)}$$. What $$TP \over (TP \ + \ FP)$$ calculates is the precision.