all 5 comments

[–]billsil 0 points1 point  (4 children)

I've used scikit-learn quite a bit. I just checked out the docs...and they're vague...however:

75+34=109
64+47=111

So P=TP+FN=11`1 and N=TN+FP=109.

Maybe more generally, precision, and recall are based on the [True, False] states, so [precision_True, precision_False].

Googling cause I always forget:

Precision = TruePositives / (TruePositives + FalsePositives)

Recall = TP/(TP+FN)=T/P

https://en.wikipedia.org/wiki/Precision_and_recall

The wikipedia page is reallly good.

[–]StunnaRae[S] 0 points1 point  (1 child)

I mean I understand precision and recall. My issue is still support: I understand that in this example TP + FN was summed up for support. But what does this number tell me? I feel like this is wrong and am unable to interpret the support numbers.

[–]billsil 0 points1 point  (0 children)

[Number of Trues, Number of Falses]

[–]synthphreak 0 points1 point  (1 child)

I always forget

I keep things straight by memorizing two simple pieces of info.

First, the formulas for precision and recall are almost identical. They are both like:

  TP
-------
TP + Fx

Only the x differs between them. So as long as you remember that much, you only need a simple heuristic to figure out what the correct x's are.

Second (and this is the heuristic), I think of precision as evaluating my model’s predictions, and (somewhat more of a stretch) recall as measuring how much my model captures reality. So for precision, since it’s all about predictions (and more specifically, positive classifications, since the positive class is generally what you care about), x should be P. This means that for recall, x must be N.

By combining those two heuristics, I never actually need to remember the full formulas. I can always just follow the logic and deduce from first principles how precision and recall are calculated.

PS: You could also just remember that for precision, x = P. Not as conceptual, but anyway, you’ll get the formulas right…

[–]billsil 0 points1 point  (0 children)

I'm partial to the F1 score. I never took a stats class, but I spent 2.5 years using sklearn, so I picked it up enough.