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=1x)p(y=1\mid\mathbf{x}), the predicted class at threshold 0.50.5, and binary cross-entropy loss.

Reveal answer or reference solution

σ(ln3)=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.

Local history

Loading attempts saved in this browser…

    Use with your agent

    Share this URL and your attempt. Ask the agent to start with a clarifying question or the smallest useful hint.

    Tutor me on https://mlprep.iwase.dev/item/original-ml-logistic/. If window.mlPrepAgent is available, read attempts for item original-ml-logistic before tutoring. Inspect my attempt, keep the item ID, and do not reveal the full answer first. After a real attempt, append its record with recorded_by agent, include agent_session_id when available, and read it back.

    Appears in