# What is difference between accuracy_score() and cross_val_score()?

The problem I'm working on is a multiclass-classification. Have been reading through lot of articles and documentation, but not able to figure out which of Accuracy_Score or Cross_Val_Score should be used to find the prediction accuracy of a model.

I tried using both but the scores are different. Cross_Val_Score() gave me 71% right prediction, but 69.93% using Accuracy_Score().

What could be the possible reason for mismatch?

Edit: Added Confusion Matrix and Classification report:

They're going to be different because in cross_val_score, you obtain an accuracy for each of your folds and average them. For each CV fold, your training and tests set are different; so, you obtain different accuracy values for each of them, and it enables you to calculate standard deviation of your accuracies, which is enclosed in parentheses in your image. accuracy_score of sklearn.metrics library calculates the accuracy based on the inputs y_pred and y_true. For example, if you input your entire training set, you'll get accuracy of your entire training set, which is of course slightly different than your CV score.
• Gunes, Thanks for the clarification. I see your point now. So, can we say accuracy_score is the correct way to measure overall prediction accuracy? – ranit.b Feb 23 '19 at 14:23
• It actually depends on what you're trying to measure, all metrics have some meaning, but for final evaluation of how good your model is, use accuracy_score with your test set. (Assuming you're not into precision/recall, or confusion matrix) – gunes Feb 23 '19 at 14:26