Compare classifiers based on AUROC or accuracy? I have a binary classification problem and I experiment different classifiers on it:
I want to compare the classifiers. which one is a better measure AUC or accuracy? And why?
Raondom Forest: AUC: 0.828  Accuracy: 79.6667 %
           SVM: AUC: 0.542  Accuracy: 85.6667 %

 A: I think you should definitely look into more metrics than just AUC and accuracy.
Accuracy (together with sensitivity and specificity) is a very simple but biased metric which forces you to look at the absolute prediction result and does not open for assertion of class probabilities or ranking. It also does not take the population into account which invites to misinterpretation as a model giving a 95% accuracy on a population with 95% chance of being correct at random isn't really a good model, even if the accuracy is high. 
AUC is a good metric for asserting model accuracy that is independent of population class probabilities. It will, however not tell you anything about how good the probability estimates actually are. You could get a high AUC but still have very skewed probability estimates. This metric more discriminating than accuracy and will definitely give you better models when used in combination with some proper scoring rule, e.g Brier score as mentioned in another post. 
You can get a more formal proof here, although this paper is quite theoretical: AUC: a Statistically Consistent and more Discriminating Measure than Accuracy
There are however a bunch of good metrics available.
Loss Functions for Binary Class Probability Estimation
and Classiﬁcation: Structure and Applications is a good paper investigaing proper scoring rules such as the Brier score. 
Another interesting paper with metrics for assertion of model performance is Evaluation: from precision, recall and F-measure to ROC, 
informedness, markedness & correlation taking up other good performance metrics such as informedness. 
To summarize I would recommend looking at AUC/Gini and Brier score to assert you model performance, but depending on the goal with your model other metrics might suit your problem better.
A: With respectful deference to Dr. Harrell’s answer regarding proper scoring metrics like the Brier Score, if only the two choices of Accuracy and AUC ROC are given, the answer is it depends upon the data and the desired outcome measure.
•   The Data: AUC ROC is prevalence-invariant; it will not vary from class imbalance.  If your binary classification dataset is not balanced (nearly equal positive and negative examples), you won’t know from the AUC.  Accuracy is a poor metric in the imbalanced case.
•   The Question: If only concerned with correct prediction, accuracy is fine.  If the real-word penalty for a ‘miss’ is similar to  a ‘hit’, accuracy is fine.  However, accuracy does not distinguish between errors and can overestimate the algorithm’s ability.  AUC ROC gives a good comparison of two models, but is only a starting point as it represents ALL potential operating points, not the SINGLE operating point an algorithm would function at.  Two algorithms with the same AUC ROC can each be superior at different operating thresholds if they do not dominate each other.
The Powers Paper Evaluation: From Precision, Recall, and F-Factor…is helpful.  Updated link.
So, both are inadequate.  However, in a balanced dataset, between two algorithms tested on the same data, AUC ROC is probably a better measure than accuracy.
A: Proportion classified correctly is an improper scoring rule, i.e., it is optimized by a bogus model.  I would use the quadratic proper scoring rule known as the Brier score, or the concordance probability (area under ROC curve in the binary $Y$ case).  Random forest works better than SVM in your case.
