Back to the 2025 paper

Unit 3: Classification & Regression

20252m

Logistic regression uses which loss function?
(i) Mean Squared Error
(ii) Euclidean Distance
(iii) Cross-Entropy
(iv) Hinge Loss

Worked SolutionAI Assisted

Answer: (iii) Cross-Entropy (Log Loss / Binary Cross-Entropy)

Explanation:

Logistic regression models p(y=1∣x)=σ(wTx+b)p(y=1|x)= \sigma(w^T x+b) where σ(z)=1/(1+e−z)\sigma(z)=1/(1+e^{-z}) and maximizes likelihood, equivalent to minimizing:

J(w)=−1m∑i[yilog⁡y^i+(1−yi)log⁡(1−y^i)]J(w)= -\frac1m \sum_{i} [y_i \log \hat{y}_i + (1-y_i)\log(1-\hat{y}_i)] — Cross-Entropy / Log Loss

  • MSE (i) is for linear regression; using it with sigmoid makes optimization non-convex and slow.
  • Euclidean Distance (ii) not a classification loss.
  • Hinge Loss (iv) is for SVM: max⁡(0,1−y⋅f(x))\max(0,1-y \cdot f(x)).

Thus (iii) Cross-Entropy is correct. It heavily penalizes confident wrong predictions and yields convex optimization.

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.