Matrix Confusion - Get Model Precision I've this matrix confusion:

[9779  107]
[2227  148]


What is the accuracy of my model? My doubt is because the confusion matrix is calculated based on Test dataset so how can it evaluate the accuracy of my model?

Thanks!
A confusion matrix gives you the following:

[TP, FP]
[FN, TN]


where TP = 'true positives'; FP = 'false positives'; FN = 'false negatives'; TN = 'true negatives'.

You can read more here: http://www.dataschool.io/simple-guide-to-confusion-matrix-terminology/

By taking TP+TN and dividing by TP+FP+FN+TN, you can get the classification accuracy of your model. In your case, that means (9779+148)/(9779+107+2227+148) = about 81%

More details:

This type of confusion matrix is used for binary classification. 


A 'true positive' in this case means a true instance of class 0; that is, the model predicts that a given example belongs to class 0 and it really does belong to class 0. 
A 'true negative' means a true instance of class 1.
A 'false positive' means the model predicts that the example belongs to class 0 when it really belongs to class 1;
A 'false negative' means the model predicts that the example belongs to class 1 when it really belongs to class 0.