Logistic probability and cross-entropy

Problem

A binary logistic model produces logit z=ln⁡(3)z=\ln(3) for a positive example y=1y=1. Compute p(y=1∣x)p(y=1\mid\mathbf{x}), the predicted class at threshold 0.50.5, and binary cross-entropy loss.

Reveal answer or reference solution

σ(ln⁡3)=34,\sigma(\ln 3)=\frac{3}{4},

so the predicted class is 11, and the loss is

−ln⁡(34)=ln⁡(43)≈0.28768.-\ln\left(\frac{3}{4}\right)=\ln\left(\frac{4}{3}\right)\approx 0.28768.

Outcome

Previous attempts

Loading attempts saved in this browser…

    Appears in