Log-loss calculation

Report a typo

Below you find predicted probabilities and class labels.

0 — Cat; 1 — Dog
yiy_i pip_i
1 0.93
0 0.35
1 0.71

Recall that log-loss can be used as a metric to compare the models. Your task is to calculate the value of the log-loss function given the data above.

Round the answer to the second decimal place. For example, if your answer is 0.34790.3479, you write 0.350.35.

Tip: Log-loss=1mi=1m(yiln(pi)+(1yi)ln(1pi))\text{Log-loss} = -\frac{1}{m} \cdot \sum_{i=1}^{m} (y_i \cdot \ln(p_i) + (1-y_i) \cdot \ln(1-p_i))

Enter a number
___

Create a free account to access the full topic