title: How to calculate TPR and FPR in Python without using sklearn?
body: <p>Initialize the list of lists:</p>
  
  <pre><code>data = [[1.0, 0.635165,0.0], [1.0, 0.766586,1.0], [1.0, 0.724564,1.0],
          [1.0, 0.766586,1.0],[1.0, 0.889199,1.0],[1.0, 0.966586,1.0],
          [1.0, 0.535165,0.0],[1.0, 0.55165,0.0],[1.0, 0.525165,0.0],
          [1.0, 0.5595165,0.0] ]
  </code></pre>
  
  <p>Create the Pandas DataFrame:</p>
  
  <pre><code>df = pd.DataFrame(data, columns = ['y', 'prob','y_predict']) 
  </code></pre>
  
  <p>Print data frame. </p>
  
  <pre><code>print(df)
  </code></pre>
  
  <p>For this data-set, I want to find:</p>
  
  <ol>
  <li>Confusion matrix without using Sklearn</li>
  <li>Numpy array of TPR and FPR without using Sklearn, for plotting ROC.</li>
  </ol>
  
  <p>How to do this in python?</p>