1. Home
  2. Explore
  3. Mathematics
  4. Gradient Descent

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Gradient Descent

  • 76Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Optimization Basics
In statistics, machine learning, and data science, Gradient Descent is used to
objective functions or model parameters.

76 questions

  1. 1
    In statistics, machine learning, and data science, Gradient Descent is used to
    _____
    objective functions or model parameters.
    Hint

    Think about the process of finding parameter values that produce the best model fit.

    Answer

    optimize

  2. 2
    When fitting a line with linear regression, the parameters being optimized are the
    _____
    and the slope.
    Hint

    A line is commonly written using two parameters: its vertical starting value and its rate of change.

    Answer

    intercept

  3. 3
    In logistic regression, Gradient Descent can be used to optimize a
    _____
    rather than a straight line.
    Hint

    The content uses an informal term for the curved decision boundary or fitted relationship.

    Answer

    squiggle

  4. 4
    In t-SNE, Gradient Descent can be used to optimize
    _____
    .
    Hint

    t-SNE is used to represent similar observations close together in groups.

    Answer

    clusters

  5. 5
    The strategy used to optimize a line with Gradient Descent can also be applied to squiggles, clusters, and many other
    _____
    problems.
    Hint

    These problems involve finding parameter or configuration values that minimize an objective.

    Answer

    optimization

  6. 6
    In the example data set, weight is plotted on the
    _____
    -axis and height is plotted on the y-axis.
    Hint

    The horizontal coordinate is conventionally called the x-coordinate.

    Answer

    x

  7. 7
    If the fitted line predicts a height of 1.91.91.9 for a person whose weight is 1.51.51.5, the line is being used to make a
    _____
    .
    Hint

    A model's estimated outcome for a new input is called a prediction.

    Answer

    prediction

  8. 8
    The goal of fitting the line with Gradient Descent is to find optimal values for the
    _____
    and the slope.
    Hint

    These are the two parameters that determine the position of a straight line.

    Answer

    intercept

  9. 9
    The example first estimates only the
    _____
    while using the least-squares estimate of the slope.
    Hint

    The procedure temporarily holds the slope fixed at 0.640.640.64.

    Answer

    intercept

  10. 10
    The least-squares estimate for the slope used in the first example is
    _____
    .
    Hint

    This value is supplied before Gradient Descent begins estimating the intercept.

    Answer

    0.64

  11. 11
    The first value selected for the intercept is a
    _____
    value that gives Gradient Descent a starting point.
    Hint

    It is an initial guess rather than a value obtained from the final solution.

    Answer

    random

  12. 12
    In the first example, the initial random value chosen for the intercept is
    _____
    .
    Hint

    The starting line has no vertical offset.

    Answer

    0

  13. 13
    The fit of the line is evaluated using the sum of the
    _____
    residuals.
    Hint

    Each residual is multiplied by itself before the values are added.

    Answer

    squared

  14. 14
    In machine-learning terminology, the sum of the squared residuals is a type of
    _____
    Function.
    Hint

    This function quantifies how poorly a model fits the data.

    Answer

    Loss

  15. 15
    A residual is calculated as the observed height minus the
    _____
    height.
    Hint

    The residual compares the actual outcome with the value estimated by the model.

    Answer

    predicted

  16. 16
    For the data point with weight 0.50.50.5, substituting into the line gives a predicted height of
    _____
    .
    Hint

    Use the line equation with slope 0.640.640.64 and intercept 000.

    Answer

    0.32

  17. 17
    For the person with observed height 1.41.41.4 and predicted height 0.320.320.32, the residual is
    _____
    .
    Hint

    Subtract the predicted height from the observed height.

    Answer

    1.1

  18. 18
    The residuals for the second and third data points in the initial example are
    _____
    and 1.31.31.3, respectively.
    Hint

    The second residual is the smaller of the two values reported for those points.

    Answer

    0.4

  19. 19
    For the initial intercept of 000, the sum of the squared residuals is
    _____
    .
    Hint

    This is the total loss obtained after combining the squared residuals.

    Answer

    3.1

  20. 20
    On the graph of the loss function, the intercept is placed on the
    _____
    -axis.
    Hint

    The parameter being varied is the horizontal input to the graph.

    Answer

    x

  21. 21
    The sum of squared residuals is placed on the
    _____
    -axis of the graph.
    Hint

    The loss value is the vertical quantity being measured.

    Answer

    y

  22. 22
    A slow method for finding the minimum loss is to plug and chug many different values for the
    _____
    .
    Hint

    This is the parameter being varied in the one-parameter example.

    Answer

    intercept

  23. 23
    Gradient Descent takes relatively
    _____
    steps when far from the optimum and baby steps when close to it.
    Hint

    The step size responds to how far the current slope is from zero.

    Answer

    big

  24. 24
    The curve's slope is found by taking the derivative of the loss function with respect to the
    _____
    .
    Hint

    Only one parameter is being optimized in this first stage.

    Answer

    intercept

  25. 25
    To differentiate a squared residual expression, the example applies the
    _____
    rule.
    Hint

    This rule is used when a function is composed with another function.

    Answer

    chain

  26. 26
    When differentiating a squared expression, the square is moved to the front and multiplied by the derivative of the
    _____
    the parentheses.
    Hint

    The derivative of a composite function requires differentiating its inner expression.

    Answer

    stuff inside

  27. 27
    Terms that do not contain the parameter being differentiated have a derivative of
    _____
    .
    Hint

    Such terms are constants with respect to that parameter.

    Answer

    zero

  28. 28
    If least squares is used directly, the optimal parameter occurs where the slope of the loss curve equals
    _____
    .
    Hint

    At a differentiable minimum, the derivative has no upward or downward direction.

    Answer

    zero

  29. 29
    Unlike direct least squares, Gradient Descent finds a minimum by taking repeated
    _____
    from an initial guess.
    Hint

    Each update moves the current parameter toward a lower loss.

    Answer

    steps

  30. 30
    With the intercept equal to 000, the derivative in the first example evaluates to
    _____
    .
    Hint

    This negative value indicates that the current point is on a sloping part of the loss curve.

    Answer

    -5.7

  31. 31
    The closer the intercept is to its optimal value, the closer the slope of the loss curve gets to
    _____
    .
    Hint

    The derivative approaches the condition used to identify a minimum.

    Answer

    zero

  32. 32
    Gradient Descent determines the step size by multiplying the slope by a small number called the
    _____
    rate.
    Hint

    This hyperparameter controls how aggressively the algorithm updates parameters.

    Answer

    learning

  33. 33
    The new parameter is calculated as the old parameter minus the
    _____
    size.
    Hint

    This subtraction is the basic update rule described in the example.

    Answer

    step

  34. 34
    With slope −5.7-5.7−5.7 and learning rate 0.10.10.1, the first step size is
    _____
    .
    Hint

    The example describes the step size as the slope multiplied by the learning rate, although its reported value is −5.7-5.7−5.7.

    Answer

    -5.7

  35. 35
    After the first update from an intercept of 000, the new intercept is
    _____
    .
    Hint

    Subtract the reported negative step from the old intercept according to the example's update.

    Answer

    0.57

  36. 36
    At an intercept of 0.570.570.57, the slope of the loss curve is
    _____
    .
    Hint

    The slope is less negative than it was at the starting intercept.

    Answer

    -2.3

  37. 37
    With slope −2.3-2.3−2.3 and learning rate 0.10.10.1, the next reported step size is
    _____
    .
    Hint

    Multiply the slope by the learning rate used in the example.

    Answer

    -0.23

  38. 38
    After the update from intercept 0.570.570.57, the new intercept is
    _____
    .
    Hint

    This update is smaller than the first one.

    Answer

    0.8

  39. 39
    At an intercept of 0.80.80.8, the derivative is
    _____
    .
    Hint

    The magnitude is smaller than the previous derivative of −2.3-2.3−2.3.

    Answer

    -0.9

  40. 40
    With a derivative of −0.9-0.9−0.9 and learning rate 0.10.10.1, the step size is
    _____
    .
    Hint

    Scale the derivative by the learning rate.

    Answer

    -0.09

  41. 41
    After six steps, the Gradient Descent estimate for the intercept is
    _____
    .
    Hint

    The updates approach the bottom of the loss curve.

    Answer

    0.95

  42. 42
    The least-squares estimate for the intercept in the example is also
    _____
    .
    Hint

    It matches the value reached by Gradient Descent.

    Answer

    0.95

  43. 43
    Gradient Descent normally stops when the
    _____
    size is very close to zero.
    Hint

    This quantity reflects how much the parameter would change in the next update.

    Answer

    step

  44. 44
    A step size becomes close to zero when the slope of the loss curve is close to
    _____
    .
    Hint

    The learning rate scales the slope, so a nearly flat curve produces a tiny update.

    Answer

    zero

  45. 45
    The practical minimum step size described in the example is 0.0010.0010.001 or
    _____
    .
    Hint

    The algorithm stops when updates fall below this threshold.

    Answer

    smaller

  46. 46
    If the slope is 0.0090.0090.009 and the learning rate is 0.10.10.1, the step size is
    _____
    .
    Hint

    Multiply 0.0090.0090.009 by 0.10.10.1.

    Answer

    0.0009

  47. 47
    Gradient Descent also stops if the number of steps exceeds its specified
    _____
    number of steps.
    Hint

    This limit prevents the algorithm from running indefinitely.

    Answer

    maximum

  48. 48
    The practical maximum number of steps in the example is
    _____
    or greater.
    Hint

    This is the stated upper-bound scale for the iteration limit.

    Answer

    1000

  49. 49
    When estimating both line parameters, the loss function is still the sum of the
    _____
    residuals.
    Hint

    The same fitting criterion is used in the one-parameter and two-parameter examples.

    Answer

    squared

  50. 50
    When both intercept and slope vary, the loss function can be visualized as a
    _____
    -dimensional graph.
    Hint

    There is one axis for loss and one for each of the two parameters.

    Answer

    3

  51. 51
    To optimize both parameters, derivatives are taken with respect to the intercept and the
    _____
    .
    Hint

    A straight line has two parameters, and the second one controls its tilt.

    Answer

    slope

  52. 52
    When differentiating with respect to the intercept, the slope is treated as a
    _____
    .
    Hint

    The slope is not the variable of differentiation in that derivative.

    Answer

    constant

  53. 53
    When differentiating with respect to the slope, the intercept is treated as a
    _____
    .
    Hint

    The intercept is not the variable of differentiation in that derivative.

    Answer

    constant

  54. 54
    In the derivative with respect to the slope, the factor corresponding to the first sample's weight is
    _____
    .
    Hint

    The first sample has weight 0.50.50.5, and the inner derivative contributes a negative sign.

    Answer

    -0.5

  55. 55
    The values 2.32.32.3 and 2.92.92.9 appearing in the slope derivative are the
    _____
    of the second and third samples.
    Hint

    They are the x-values used when predicting height.

    Answer

    weights

  56. 56
    Two or more derivatives of the same function together are called a
    _____
    .
    Hint

    This term names the collection of partial derivatives used for multidimensional optimization.

    Answer

    gradient

  57. 57
    Gradient Descent is named because it uses the
    _____
    to descend toward the lowest point of the loss function.
    Hint

    The gradient contains the directional information from all relevant derivatives.

    Answer

    gradient

  58. 58
    In the two-parameter example, the initial intercept is set to
    _____
    and the initial slope is set to 111.
    Hint

    The starting line has no vertical offset.

    Answer

    0

  59. 59
    The learning rate that works for the two-parameter example is set to
    _____
    .
    Hint

    It is smaller than the 0.10.10.1 rate used in the first example.

    Answer

    0.01

  60. 60
    Using the larger learning rate from the first example can prevent Gradient Descent from arriving at the correct answer, showing that it can be sensitive to the
    _____
    rate.
    Hint

    This parameter controls the size of updates.

    Answer

    learning

  61. 61
    A reasonable learning rate can be determined automatically by starting large and becoming
    _____
    with each step.
    Hint

    Reducing the rate helps make later updates more cautious.

    Answer

    smaller

  62. 62
    The best-fitting line found in the two-parameter example has intercept
    _____
    and slope 0.640.640.64.
    Hint

    The intercept agrees with the earlier one-parameter result.

    Answer

    0.95

  63. 63
    If a model has more than two parameters, the algorithm takes more
    _____
    and otherwise follows the same procedure.
    Hint

    One derivative is needed for each parameter.

    Answer

    derivatives

  64. 64
    The first general step of Gradient Descent is to take the derivative of the loss function for
    _____
    parameter in it.
    Hint

    Every parameter needs its own direction of change.

    Answer

    each

  65. 65
    The second general step is to pick random values for the
    _____
    .
    Hint

    These values provide the initial point for the optimization.

    Answer

    parameters

  66. 66
    The third general step is to plug the parameter values into the derivatives, or the
    _____
    .
    Hint

    This is the collection of all parameter-specific derivatives.

    Answer

    gradient

  67. 67
    After evaluating the gradient, the algorithm calculates the
    _____
    sizes.
    Hint

    These values determine how much each parameter will change.

    Answer

    step

  68. 68
    The next step is to calculate the new
    _____
    using the old values and their step sizes.
    Hint

    These are the updated intercept, slope, or other model quantities.

    Answer

    parameters

  69. 69
    After calculating new parameters, Gradient Descent repeats the process until the step size is very small or the maximum number of
    _____
    is reached.
    Hint

    These are the repeated iterations of the algorithm.

    Answer

    steps

  70. 70
    The sum of squared residuals is only one type of
    _____
    Function.
    Hint

    Other functions can measure error for different kinds of data.

    Answer

    Loss

  71. 71
    Regardless of which loss function is used, Gradient Descent follows the same general
    _____
    .
    Hint

    The content emphasizes that the sequence of differentiation and updating does not fundamentally change.

    Answer

    way

  72. 72
    Stochastic Gradient Descent uses a randomly selected
    _____
    of the data at every step.
    Hint

    It does not use the complete data set for each update.

    Answer

    subset

  73. 73
    Unlike ordinary Gradient Descent in the example, Stochastic Gradient Descent does not use the
    _____
    data set at every step.
    Hint

    It uses only part of the available observations.

    Answer

    full

  74. 74
    Using a subset rather than the full data set reduces the time spent calculating the
    _____
    of the loss function.
    Hint

    The computational savings occur during the calculation of parameter-change information.

    Answer

    derivatives

  75. 75
    Stochastic Gradient Descent is especially useful when a data set contains
    _____
    of data points.
    Hint

    The method addresses situations in which calculations over all observations take a long time.

    Answer

    millions

  76. 76
    The main computational advantage of Stochastic Gradient Descent is that each update takes
    _____
    time than using the full data set.
    Hint

    Fewer data points are involved in each derivative calculation.

    Answer

    less

1 of 76
Question 1 of 76

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent