0
$\begingroup$

Here how these class-0 probability are calculated??

print(classification_report(y_true, y_pred, target_names=target_names)) precision recall f1-score support

class 0       0.50      1.00      0.67         1
class 1       1.00      0.67      0.80         3

avg / total 0.70 0.60 0.61 4

$\endgroup$
0
$\begingroup$

You may want to have a look at the documentation for the classification_report function.

  • The first measure shown is precision: n(True positive) / (n(True positive) + n(False positive)
  • The second measure shown is recall: n(True positive) / (n(True positive)) + n(False positive)
  • The third one is F1 score: 2* (Precision * Recall)/(Precision + Recall)
$\endgroup$
  • $\begingroup$ Thanks for your response. yeah for precison_class0 = TN/(TN+FN) and for precision_class1 = TP/(TP+FP). $\endgroup$ – Haribaskar Dhanabalan Aug 14 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.