Curated · Logistic Regression

NAT · 1 mark · Problem ML-LOGR-0004

A logistic regression model predicts \(P(y=1\mid\mathbf x)=\sigma(\mathbf w^{\top}\mathbf x+b)\), where \(\sigma(z)=\dfrac{1}{1+e^{-z}}\), with \(\mathbf w=(2,\,-1)\) and \(b=-1\). For the input \(\mathbf x=(1.2,\,0.3)\), the predicted probability \(P(y=0\mid\mathbf x)\) is (round to 2 decimals).

Numerical answer (NAT).

Solve it on GATE DA practice →More Supervised Learning — Classification problems

Show the worked solution\[\boxed{P(y=0\mid\mathbf x)=1-\sigma(z)=\sigma(-z)=\frac{1}{1+e^{z}},\qquad z=\mathbf w^{\top}\mathbf x+b}\]\(z=2(1.2)+(-1)(0.3)+(-1)=2.4-0.3-1=1.1\).\[P(y=0\mid\mathbf x)=\frac{1}{1+e^{1.1}}=\frac{1}{1+3.004}\approx0.25 .\](\(\sigma(1.1)\approx0.75\) is \(P(y=1\mid\mathbf x)\), the usual slip.)Answer: 0.25

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com