title: ROC curve for classification from randomForest
body: <p>I am using <code>randomForest</code> package in R platform for classification task. </p>
  
  <pre><code>rf_object&lt;-randomForest(data_matrix, label_factor, cutoff=c(k,1-k))
  </code></pre>
  
  <p>where k ranges from 0.1 to 0.9.</p>
  
  <pre><code>pred &lt;- predict(rf_object,test_data_matrix)
  </code></pre>
  
  <p>I have the output from the random forest classifier and I compared it with the labels. So, I have the performance measures like accuracy, MCC, sensitivity, specificity, etc for 9 cutoff points.</p>
  
  <p>Now, I want to plot the ROC curve and obtain the area under the ROC curve to see how good the performance is. Most of the packages in R (like ROCR, pROC) require prediction and labels but I have sensitivity (TPR) and specificity (1-FPR).</p>
  
  <p>Can any one suggest me if the cutoff method is correct or reliable to produce ROC curve?
  Do you know any way to obtain ROC curve and area under the curve using TPR and FPR?</p>
  
  <p>I also tried to use the following command to train random forest. This way the predictions were continuous and were acceptable to <code>ROCR</code> and <code>pROC</code> packages in R. But, I am not sure if this is correct way to do. Can any one suggest me about this method?</p>
  
  <pre><code>rf_object &lt;- randomForest(data_matrix, label_vector)
  pred &lt;- predict(rf_object, test_data_matrix)
  </code></pre>
  
  <p>Thank you for your time reading my problem! I have spent long time surfing for this. Thank you for your suggestion/advice.</p>