Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (18.4k points)
edited by
I have completed my college project in Data Science, using R . My teacher asked me a question by seeing my confusion matrix. She asked me were is recall in it?

I know the code to build the confusion matrix. But I didn't know about the recall, where is it present in the confusion matrix? Can anyone explain this to me?

1 Answer

0 votes
by (36.8k points)

I am using the sample code from my project to explain to you what is a recall in the confusion matrix. Below is the code for confusion matrix were I am passing 2 attributes one is my model and another is my target column.

tab<-table(lm.pred,censusTest1$X)

> tab

 So my out for the confusion matrix is as shown below:

lm.pred <=50K  >50K

  <=50K  7201    1939

  >50K    728      689

Recall means in normal terminology to remember, So we are testing the model and finding out how much the model is able to recall. If you see the 7201 and 689values are been recalled by the model correctly and 1939 and 728 values are not recalled correctly. This the meaning of recall.

To calculate recall we have a formula

True positive / True positive + False negative

You can also refer to the Data Science link with python which provides the detail information of python from scratch and also real-time projects for learning, with a detail explanation of code.

Browse Categories

...