Home > Blockchain >  What is the F1 Score for my prediction when all values are negative?
What is the F1 Score for my prediction when all values are negative?

Time:11-02

I have built a model that gives me classification of some cases

here is a comparison between Actual and Prediction

Prediction   Actual
------------------------
    0          0
    0          0
    0          0
    0          0
    0          0
    0          0
    0          0
    0          0
    0          0

They all match and they all negative

when I try to get F1 Score for this case I get divided by zero

which makes sense as the Precision is TP / TP FP (which all are zeros)

so in my case what would the F1 score be?

CodePudding user response:

In this case, you cannot calculate F1-score. You cannot also calculate precision and recall score. Use accuracy instead of them.

CodePudding user response:

I think you already answered your question: Divided by Zero. F1-score is calculated from Precision and Recall. Your example only contains negative case. So you can't calculate positive related items(Precision). In human words: You don't have enough data to evaluate this model.

  • Related