Machine Learning
The questions and answers in this lesson will help you understand the types of machine learning questions you can expect in data science interviews.
We'll cover the following...
What do you understand by accuracy, recall, and precision?
Consider that we have to predict a dichotomous variable that has "yes" and "no" responses, as shown below:
Confusion matrix
Predicted | |||
no | yes | ||
Actual | no | 9800 | 100 |
yes | 30 | 70 |
There were 9,000 "no" responses in the data and 100 "yes" responses. Accuracy is the percentage of correct predictions of positive and negative responses. Considering "yes" as a positive response and "no" as a negative response, the accuracy will be (9800+70)/10000 = 98.7%.
The recall is the percentage of positive responses predicted correctly out of the total positive responses. Here, our positive response is "yes." Therefore, 70 responses are correctly predicted from ...