Logistic probability and loss

Problem

A binary logistic model has logit z=w1x1+w2x2+bz=w_1x_1+w_2x_2+b. State its feature-space decision boundary at threshold 0.50.5. Then, for an example with z=ln⁡4z=\ln 4 and y=0y=0, compute P(y=1∣x)P(y=1\mid x), the predicted class, and binary cross-entropy.

Reveal answer or reference solution

Since σ(z)=0.5\sigma(z)=0.5 exactly when z=0z=0, the decision boundary is

w1x1+w2x2+b=0.w_1x_1+w_2x_2+b=0.

Also, σ(ln⁡4)=45\sigma(\ln 4)=\frac{4}{5}. Since 45≥0.5\frac{4}{5}\ge 0.5, the predicted class is 11. For y=0y=0, the loss is

−ln⁡(1−45)=ln⁡5≈1.6094379124.-\ln\left(1-\frac{4}{5}\right)=\ln 5\approx 1.6094379124.
Outcome

Previous attempts

Loading attempts saved in this browser…

    Review Screening Results