Back to the 2022 paper

Module 1: Introduction

20222m

Which of the following statement(s) is/are true for Gradient Decent (GD) and Stochastic Gradient Decent (SGD)?
(1) In GD and SGD, you update a set of parameters in an iterative manner to function. minimize the error
(2) In SGD, you have to run through all the samples in your training set for a single update of a parameter in each iteration.
(3) In GD, you either use the entire data or a subset of training data to update a parameter in each iteration.

(i) Only (1)
(ii) (1) and (2) only
(iii) (3) and (2) only
(iv) (1), (2) and (3)

Worked SolutionAI Assisted

Answer: (i) Only (1) — as per correct ML theory. Note many exam keys incorrectly mark (ii) due to typo; clarified below.

Statement analysis:

  • (1) In GD and SGD, you update a set of parameters iteratively to minimize the error — TRUE. Both are iterative optimization algorithms: $w := w - \eta
    abla J(w)$.

  • (2) In SGD you have to run through all samples for a single update — FALSE. SGD uses one randomly chosen sample (or one mini-batch) per update. Statement describes Batch GD, not SGD. This is a common textbook error in the question.

  • (3) In GD you either use entire data or subset to update — FALSE. Standard GD uses entire training set per update. Using a subset is Mini-batch GD or SGD, not vanilla GD.

Strictly: only (1) is true → (i) Only (1). If exam expects (ii) or (iii), it has swapped definitions. Conceptual correct behavior:

  • GD: one update per epoch using all mm examples — expensive but stable.
  • SGD: one update per example — noisy but fast, frequent updates.
  • Mini-batch: compromise (e.g., 32/64 samples).

Similar questions

Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.