What exactly the ROC curve can tell us or can be inferred? (I post this originally at https://stackoverflow.com/questions/15477282/what-exactly-the-roc-curve-can-tell-us-or-can-be-inferred, but people directed me to here. Sorry about posting this twice.)
I wrote some codes to run a linear discriminant analysis based classification:
%% Construct a LDA classifier with selected features and ground truth information
LDAClassifierObject                     = ClassificationDiscriminant.fit(featureSelcted, groundTruthGroup, 'DiscrimType', 'linear');
LDAClassifierResubError                 = resubLoss(LDAClassifierObject);

Thus, I can get
Resubstitution Error of LDA (Training Error): 1.7391e-01
Resubstitution Accuracy of LDA: 82.61%
Confusion Matrix of LDA:
    14     3
     1     5

Then I run a ROC analysis for the LDA classifier:
% Predict resubstitution response of LDA classifier
[LDALabel, LDAScore]                    = resubPredict(LDAClassifierObject);

% Fit probabilities for scores (the groundTruthGroup contains lables either 'Good' or 'Bad')
[FPR, TPR, Thr, AUC, OPTROCPT]      = perfcurve(groundTruthGroup(:,1), LDAScore(:,1), 'Good');

I have got:
OPTROCPT =

    0.1250    0.8667

Therefore, we can get:
Accuracy of LDA after ROC analysis: 86.91%
Confusion Matrix of LDA after ROC analysis:
    13     1
     2     7

My questions are:


*

*After ROC analysis we obtained a better accuracy, when we report the accuracy of the classifier, which value we should use? What exactly the ROC curve can tell us or can be inferred? Can we say after ROC analysis we found a better accuracy of the LDA classifier?

*Why the ROC can produce a better accuracy for the classifier, but the original ClassificationDiscriminant.fit can't?

*I have also done a cross validation for the LDA classifier, like
cvLDAClassifier                     = crossval(LDAClassifierObject, 'leaveout', 'on');
Then how to get the ROC analysis for the cross validation? 'resubPredict' method seems only accept 'discriminant object' as input, then how can we get the scores?
4.. classperf function of Matlab is very handy to gather all the information of the classifier, like
%% Get the performance of the classifier
LDAClassifierPerformace                 = classperf(groundTruthGroup, resubPredict(LDAClassifierObject));

However, anyone knows how to gather these information such as accuracy, FPR, etc. for the cross validation results?
Thanks very much. I am really looking forward to see the reply to above questions. 
A.
 A: 
After ROC analysis we obtained a better accuracy, when we report the
  accuracy of the classifier, which value we should use?

It is important to realize that ROC analysis in this case is not improving your results. The reason you are seeing better results is that you are calculating the ROC curve based on all of your data, while the LDA is calculated using resubstitution. Therefore you are not comparing like with like when comparing the two results above, and are getting optimistic results. A better way to do this is to calculate the ROC area inside each test fold of a cross-validation so that you are calculating ROC area and classification accuracy on the same test cases.

What exactly the ROC curve can tell us or can be inferred? Can we say
  after ROC analysis we found a better accuracy of the LDA classifier?

The ROC curve should be considered as a means of evaluating the performance of your classifier model; the area under the ROC curve is an index of discrimination (and is related to the Mann-Whitney U), i.e. the larger the area under the ROC curve the better the classifier can distinguish between your two classes. 
When you have unbalanced classes (uneven proportions of each class), the ROC area can be more useful than classification accuracy in examining the performance of your classifier.
