Common Machine Learning Statistics

Tue 01 January 2019


Distributions

labels can be: "1", "2", "3"

"1" "2" ... "Mis-prediction" "1" - 1 - 0 "2" - 0 - 1 "3" - 0 - 1 ...

  • recall For example, if y_true is [0, 1, 1, 1] and y_pred is [1, 0, 1, 1] then the recall value is 2/(2+1) ie. 0.66. If the weights were specified as [0, 0, 1, 0] then the recall value would be 1.

This metric creates two local variables, true_positives and false_negatives, that are used to compute the recall. This value is ultimately returned as recall, an idempotent operation that simply divides true_positives by the sum of true_positives and false_negatives.