1. Home
  2. Explore
  3. Computer Science
  4. Linear Regression Introduction

Study methods

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

Linear Regression Introduction

  • 37Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Supervised Learning Basics

What distinguishes a supervised learning regression problem from a classification problem?

37 questions

  1. 1

    What distinguishes a supervised learning regression problem from a classification problem?

    1. A

      Regression uses labeled data, while classification uses unlabeled data.

    2. B

      The input features are continuous for regression, and discrete for classification.

    3. C

      The output variable is continuous for regression, and categorical for classification.

    4. D

      Regression requires a linear hypothesis, while classification requires a nonlinear hypothesis.

    Correct answer
    C

    The output variable is continuous for regression, and categorical for classification.

    Explanation

    In supervised learning, regression predicts continuous values (e.g., price), while classification predicts discrete labels (e.g., category).

  2. 2

    In the linear regression hypothesis hθ(x)=θ0+θ1xh_\theta(x) = \theta_0 + \theta_1 xhθ​(x)=θ0​+θ1​x, what is the role of θ0\theta_0θ0​?

    1. A

      It is the slope of the line.

    2. B

      It is the weight for the feature xxx.

    3. C

      It is the intercept term, allowing the hypothesis to fit data not passing through the origin.

    4. D

      It represents the input feature value.

    Correct answer
    C

    It is the intercept term, allowing the hypothesis to fit data not passing through the origin.

    Explanation

    θ0\theta_0θ0​ is the bias term (intercept), making the hypothesis an affine function, not necessarily linear through the origin.

  3. 3

    In linear regression with multiple features, how is the hypothesis expressed using summation notation?

    1. A

      hθ(x)=∑j=1nθjxjh_\theta(x) = \sum_{j=1}^n \theta_j x_jhθ​(x)=∑j=1n​θj​xj​.

    2. B

      hθ(x)=∑j=0nθjxjh_\theta(x) = \sum_{j=0}^n \theta_j x_jhθ​(x)=∑j=0n​θj​xj​, where x0=1x_0 = 1x0​=1.

    3. C

      hθ(x)=∑i=1mθixih_\theta(x) = \sum_{i=1}^m \theta_i x_ihθ​(x)=∑i=1m​θi​xi​.

    4. D

      hθ(x)=∑j=0nθjxjh_\theta(x) = \sum_{j=0}^n \theta_j x_jhθ​(x)=∑j=0n​θj​xj​, where θ0=1\theta_0 = 1θ0​=1.

    Correct answer
    B

    hθ(x)=∑j=0nθjxjh_\theta(x) = \sum_{j=0}^n \theta_j x_jhθ​(x)=∑j=0n​θj​xj​, where x0=1x_0 = 1x0​=1.

    Explanation

    The hypothesis is ∑j=0nθjxj\sum_{j=0}^n \theta_j x_j∑j=0n​θj​xj​ with x0=1x_0=1x0​=1 to include the intercept term conveniently.

  4. 4

    What do mmm and nnn represent in the context of linear regression?

    1. A

      mmm is the number of features, and nnn is the number of training examples.

    2. B

      mmm is the number of parameters, and nnn is the number of iterations.

    3. C

      mmm is the number of output variables, and nnn is the number of input variables.

    4. D

      mmm is the number of training examples, and nnn is the number of features.

    Correct answer
    D

    mmm is the number of training examples, and nnn is the number of features.

    Explanation

    Standard notation: mmm = number of training examples, nnn = number of features.

  5. 5

    How is the cost function J(θ)J(\theta)J(θ) defined for linear regression?

    1. A

      J(θ)=1m∑i=1m(hθ(x(i))−y(i))4J(\theta) = \frac{1}{m} \sum_{i=1}^m (h_\theta(x^{(i)}) - y^{(i)})^4J(θ)=m1​∑i=1m​(hθ​(x(i))−y(i))4

    2. B

      J(θ)=12m∑i=1m(hθ(x(i))−y(i))2J(\theta) = \frac{1}{2m} \sum_{i=1}^m (h_\theta(x^{(i)}) - y^{(i)})^2J(θ)=2m1​∑i=1m​(hθ​(x(i))−y(i))2

    3. C

      J(θ)=12∑i=1m(hθ(x(i))−y(i))J(\theta) = \frac{1}{2} \sum_{i=1}^m (h_\theta(x^{(i)}) - y^{(i)})J(θ)=21​∑i=1m​(hθ​(x(i))−y(i))

    4. D

      J(θ)=1m∑i=1m∣hθ(x(i))−y(i)∣J(\theta) = \frac{1}{m} \sum_{i=1}^m |h_\theta(x^{(i)}) - y^{(i)}|J(θ)=m1​∑i=1m​∣hθ​(x(i))−y(i)∣

    Correct answer
    B

    J(θ)=12m∑i=1m(hθ(x(i))−y(i))2J(\theta) = \frac{1}{2m} \sum_{i=1}^m (h_\theta(x^{(i)}) - y^{(i)})^2J(θ)=2m1​∑i=1m​(hθ​(x(i))−y(i))2

    Explanation

    The cost function is half of the average squared error, simplifying derivative calculations.

  6. 6

    Why is the factor 12\frac{1}{2}21​ included in the cost function J(θ)J(\theta)J(θ)?

    1. A

      To scale the gradient so that it fits within numerical precision.

    2. B

      To make the cost function independent of the number of training examples.

    3. C

      To cancel the factor of 2 that appears when taking the derivative of square terms.

    4. D

      To ensure the cost function is convex.

    Correct answer
    C

    To cancel the factor of 2 that appears when taking the derivative of square terms.

    Explanation

    The 12\frac{1}{2}21​ cancels the 2 from the derivative of (h−y)2(h-y)^2(h−y)2, simplifying gradient expressions.

  7. 7

    In batch gradient descent, how is the parameter θj\theta_jθj​ updated?

    1. A

      θj:=θj−α1m∑i=1m(hθ(x(i))−y(i))xj(i)\theta_j := \theta_j - \alpha \frac{1}{m} \sum_{i=1}^m (h_\theta(x^{(i)}) - y^{(i)}) x_j^{(i)}θj​:=θj​−αm1​∑i=1m​(hθ​(x(i))−y(i))xj(i)​

    2. B

      θj:=θj−α12m∑i=1m(hθ(x(i))−y(i))xj(i)\theta_j := \theta_j - \alpha \frac{1}{2m} \sum_{i=1}^m (h_\theta(x^{(i)}) - y^{(i)}) x_j^{(i)}θj​:=θj​−α2m1​∑i=1m​(hθ​(x(i))−y(i))xj(i)​

    3. C

      θj:=θj−α1m∑i=1m(hθ(x(i))−y(i))2\theta_j := \theta_j - \alpha \frac{1}{m} \sum_{i=1}^m (h_\theta(x^{(i)}) - y^{(i)})^2θj​:=θj​−αm1​∑i=1m​(hθ​(x(i))−y(i))2

    4. D

      θj:=θj−α(hθ(x(j))−y(j))xj(j)\theta_j := \theta_j - \alpha (h_\theta(x^{(j)}) - y^{(j)}) x_j^{(j)}θj​:=θj​−α(hθ​(x(j))−y(j))xj(j)​

    Correct answer
    A

    θj:=θj−α1m∑i=1m(hθ(x(i))−y(i))xj(i)\theta_j := \theta_j - \alpha \frac{1}{m} \sum_{i=1}^m (h_\theta(x^{(i)}) - y^{(i)}) x_j^{(i)}θj​:=θj​−αm1​∑i=1m​(hθ​(x(i))−y(i))xj(i)​

    Explanation

    Batch gradient descent uses the average gradient over all training examples.

  8. 8

    What is the main disadvantage of batch gradient descent?

    1. A

      It cannot be used with a squared error cost function.

    2. B

      Each iteration requires scanning the entire training set, which is slow for large datasets.

    3. C

      It converges to a local minimum instead of the global minimum.

    4. D

      It requires the learning rate to be exactly 0.01.

    Correct answer
    B

    Each iteration requires scanning the entire training set, which is slow for large datasets.

    Explanation

    Batch GD sums over all mmm examples per step, making it computationally expensive for large mmm.

  9. 9

    How does stochastic gradient descent (SGD) differ from batch gradient descent?

    1. A

      SGD always converges exactly to the global minimum, while batch GD may not.

    2. B

      SGD is only applicable to linear regression, while batch GD works for any model.

    3. C

      SGD updates parameters using one training example at a time, while batch GD uses the entire dataset.

    4. D

      SGD uses a larger learning rate than batch GD.

    Correct answer
    C

    SGD updates parameters using one training example at a time, while batch GD uses the entire dataset.

    Explanation

    SGD performs an update for each individual example, making it faster per iteration but with noisy convergence.

  10. 10

    What is a typical convergence behavior of stochastic gradient descent?

    1. A

      It will oscillate around the minimum and never perfectly converge, but often gets close.

    2. B

      It converges exactly to the global minimum after one pass through the data.

    3. C

      It diverges unless the learning rate is decreased over time.

    4. D

      It converges faster than batch GD but requires second-order information.

    Correct answer
    A

    It will oscillate around the minimum and never perfectly converge, but often gets close.

    Explanation

    SGD's updates are noisy, so it bounces around the minimum; decreasing learning rate helps it settle closer.

  11. 11

    When is batch gradient descent preferred over stochastic gradient descent?

    1. A

      When the dataset is small (e.g., hundreds to thousands of examples) and computational cost is acceptable.

    2. B

      When the dataset is very large (millions of examples) to ensure convergence.

    3. C

      When the learning rate needs to be selected automatically.

    4. D

      When the cost function is not convex.

    Correct answer
    A

    When the dataset is small (e.g., hundreds to thousands of examples) and computational cost is acceptable.

    Explanation

    For small datasets, batch GD is simpler and avoids tuning for noisy convergence; for large datasets, SGD is more efficient.

  12. 12

    In the derivation of the normal equations, what is the design matrix XXX?

    1. A

      A matrix where each column is a training example feature vector x(i)x^{(i)}x(i).

    2. B

      A matrix containing the target values y(i)y^{(i)}y(i).

    3. C

      A matrix where the first column is all ones and the remaining columns are feature values.

    4. D

      A matrix where each row is the transpose of a training example feature vector x(i)x^{(i)}x(i).

    Correct answer
    D

    A matrix where each row is the transpose of a training example feature vector x(i)x^{(i)}x(i).

    Explanation

    The design matrix XXX is m×(n+1)m \times (n+1)m×(n+1) with rows (x(i))T(x^{(i)})^T(x(i))T, used to compute XθX\thetaXθ as predictions.

  13. 13

    What is the normal equation solution for the optimal θ\thetaθ in linear regression?

    1. A

      θ=(XTX)−1XTy\theta = (X^T X)^{-1} X^T yθ=(XTX)−1XTy

    2. B

      θ=X−1y\theta = X^{-1} yθ=X−1y

    3. C

      θ=(XTX)XTy\theta = (X^T X) X^T yθ=(XTX)XTy

    4. D

      θ=XT(XXT)−1y\theta = X^T (X X^T)^{-1} yθ=XT(XXT)−1y

    Correct answer
    A

    θ=(XTX)−1XTy\theta = (X^T X)^{-1} X^T yθ=(XTX)−1XTy

    Explanation

    By setting the derivative of J(θ)J(\theta)J(θ) to zero, we obtain XTXθ=XTyX^T X \theta = X^T yXTXθ=XTy, leading to θ=(XTX)−1XTy\theta = (X^T X)^{-1} X^T yθ=(XTX)−1XTy if XTXX^T XXTX is invertible.

  14. 14

    What does it mean if XTXX^T XXTX is non-invertible?

    1. A

      The cost function is not convex.

    2. B

      The features are linearly dependent (redundant), e.g., duplicate or collinear features.

    3. C

      Gradient descent will not work.

    4. D

      The number of training examples is less than the number of features.

    Correct answer
    B

    The features are linearly dependent (redundant), e.g., duplicate or collinear features.

    Explanation

    Non-invertibility often indicates redundant features; using the pseudo-inverse can still yield a solution, but it's better to remove redundant features.

  15. 15

    What is the trace of a square matrix AAA?

    1. A

      The sum of its diagonal entries.

    2. B

      The product of its diagonal entries.

    3. C

      The sum of all entries of AAA.

    4. D

      The determinant of AAA.

    Correct answer
    A

    The sum of its diagonal entries.

    Explanation

    The trace tr(A)=∑iAii\mathrm{tr}(A) = \sum_i A_{ii}tr(A)=∑i​Aii​.

  16. 16

    Which property of the trace operator is used in deriving the normal equations?

    1. A

      tr(A+B)=tr(A)+tr(B)\mathrm{tr}(A+B) = \mathrm{tr}(A) + \mathrm{tr}(B)tr(A+B)=tr(A)+tr(B)

    2. B

      tr(A−1)=1/tr(A)\mathrm{tr}(A^{-1}) = 1/\mathrm{tr}(A)tr(A−1)=1/tr(A)

    3. C

      tr(AB)=tr(BA)\mathrm{tr}(AB) = \mathrm{tr}(BA)tr(AB)=tr(BA)

    4. D

      tr(AT)=tr(A)\mathrm{tr}(A^T) = \mathrm{tr}(A)tr(AT)=tr(A)

    Correct answer
    C

    tr(AB)=tr(BA)\mathrm{tr}(AB) = \mathrm{tr}(BA)tr(AB)=tr(BA)

    Explanation

    The cyclic permutation property tr(AB)=tr(BA)\mathrm{tr}(AB) = \mathrm{tr}(BA)tr(AB)=tr(BA) is used when differentiating the quadratic form.

  17. 17

    In the gradient descent update for linear regression, what is the partial derivative of J(θ)J(\theta)J(θ) with respect to θj\theta_jθj​ for a single training example (x,y)(x, y)(x,y)?

    1. A

      (y−hθ(x))(y - h_\theta(x))(y−hθ​(x))

    2. B

      (hθ(x)−y)xj(h_\theta(x) - y) x_j(hθ​(x)−y)xj​

    3. C

      (hθ(x)−y)2xj(h_\theta(x) - y)^2 x_j(hθ​(x)−y)2xj​

    4. D

      12(hθ(x)−y)xj\frac{1}{2} (h_\theta(x) - y) x_j21​(hθ​(x)−y)xj​

    Correct answer
    B

    (hθ(x)−y)xj(h_\theta(x) - y) x_j(hθ​(x)−y)xj​

    Explanation

    For one example, the derivative is (hθ(x)−y)⋅xj(h_\theta(x) - y) \cdot x_j(hθ​(x)−y)⋅xj​, derived from the chain rule.

  18. 18

    What is a common default value for the learning rate α\alphaα in gradient descent?

    1. A

      0.001

    2. B

      0.01

    3. C

      0.1

    4. D

      1.0

    Correct answer
    B

    0.01

    Explanation

    A typical starting point for α\alphaα is 0.01, often adjusted on an exponential scale.

  19. 19

    Why is the learning rate α\alphaα important in gradient descent?

    1. A

      It affects the convexity of the cost function.

    2. B

      It must be set to 1 to ensure convergence.

    3. C

      It controls the step size; too large can overshoot the minimum, too small slows convergence.

    4. D

      It determines the number of iterations needed to converge exactly.

    Correct answer
    C

    It controls the step size; too large can overshoot the minimum, too small slows convergence.

    Explanation

    The learning rate governs the magnitude of parameter updates; proper tuning is essential for efficient convergence.

  20. 20

    In the transcript, what example dataset is used to illustrate linear regression?

    1. A

      Stock prices from New York Stock Exchange.

    2. B

      Self-driving car steering angles from the ALVINN project.

    3. C

      Census data from the United States.

    4. D

      Housing prices from Portland, Oregon based on size and number of bedrooms.

    Correct answer
    D

    Housing prices from Portland, Oregon based on size and number of bedrooms.

    Explanation

    The instructor uses a dataset of house sizes and prices from Portland, Oregon, collected from Craigslist.

  21. 21

    According to the lecture, what is the job of a learning algorithm in supervised learning?

    1. A

      To output a hypothesis function that maps inputs to outputs.

    2. B

      To compute the average of all output values.

    3. C

      To store all training examples in memory for prediction.

    4. D

      To find the maximum likelihood estimate of the parameters.

    Correct answer
    A

    To output a hypothesis function that maps inputs to outputs.

    Explanation

    The learning algorithm processes the training set to produce a hypothesis that makes predictions on new inputs.

  22. 22

    What notation is used to denote the iii-th training example's input features?

    1. A

      xix^ixi

    2. B

      xix_ixi​

    3. C

      x(i)x_{(i)}x(i)​

    4. D

      x(i)x^{(i)}x(i)

    Correct answer
    D

    x(i)x^{(i)}x(i)

    Explanation

    The superscript (i)(i)(i) indexes training examples, e.g., x(i)x^{(i)}x(i) and y(i)y^{(i)}y(i).

  23. 23

    In the hypothesis hθ(x)=θTxh_\theta(x) = \theta^T xhθ​(x)=θTx with x0=1x_0=1x0​=1, what is the dimensionality of θ\thetaθ if there are nnn features?

    1. A

      mmm

    2. B

      nnn

    3. C

      n−1n-1n−1

    4. D

      n+1n+1n+1

    Correct answer
    D

    n+1n+1n+1

    Explanation

    With nnn features plus the intercept, θ\thetaθ is (n+1)(n+1)(n+1)-dimensional.

  24. 24

    When running gradient descent, what does it indicate if the cost function J(θ)J(\theta)J(θ) increases instead of decreases?

    1. A

      The learning rate is too large, causing overshooting.

    2. B

      The algorithm has converged to a local maximum.

    3. C

      The cost function is not convex.

    4. D

      The learning rate is too small.

    Correct answer
    A

    The learning rate is too large, causing overshooting.

    Explanation

    An increasing cost suggests that the steps are too large, overshooting the minimum.

  25. 25

    What is the main advantage of stochastic gradient descent over batch gradient descent for large datasets?

    1. A

      It can make progress after processing a single example, without waiting for the entire dataset.

    2. B

      It does not require a learning rate.

    3. C

      It guarantees convergence to the global minimum in fewer total operations.

    4. D

      It works with non-differentiable cost functions.

    Correct answer
    A

    It can make progress after processing a single example, without waiting for the entire dataset.

    Explanation

    SGD updates parameters per example, enabling faster initial progress and feasibility for large datasets.

  26. 26

    In the normal equation derivation, which matrix derivative identity is used to differentiate θTXTXθ\theta^T X^T X \thetaθTXTXθ?

    1. A

      ∇θ(θTAθ)=θTA\nabla_\theta (\theta^T A \theta) = \theta^T A∇θ​(θTAθ)=θTA

    2. B

      ∇θ(θTAθ)=2Aθ\nabla_\theta (\theta^T A \theta) = 2A \theta∇θ​(θTAθ)=2Aθ for symmetric AAA

    3. C

      ∇θ(θTAθ)=Aθ\nabla_\theta (\theta^T A \theta) = A \theta∇θ​(θTAθ)=Aθ

    4. D

      ∇θ(θTAθ)=2θTA\nabla_\theta (\theta^T A \theta) = 2\theta^T A∇θ​(θTAθ)=2θTA

    Correct answer
    B

    ∇θ(θTAθ)=2Aθ\nabla_\theta (\theta^T A \theta) = 2A \theta∇θ​(θTAθ)=2Aθ for symmetric AAA

    Explanation

    With A=XTXA = X^T XA=XTX symmetric, the derivative is 2XTXθ2X^T X \theta2XTXθ.

  27. 27

    What is the 'inverted' technique to help stochastic gradient descent converge closer to the minimum?

    1. A

      Gradually decreasing the learning rate over time.

    2. B

      Increasing the learning rate over time.

    3. C

      Using batch gradient descent after SGD.

    4. D

      Initializing parameters to zero.

    Correct answer
    A

    Gradually decreasing the learning rate over time.

    Explanation

    Decreasing the learning rate reduces the oscillation magnitude, allowing SGD to settle nearer the optimum.

  28. 28

    In the lecture, what is the relationship between the trace operator and matrix derivatives?

    1. A

      The derivative of tr(AB)\mathrm{tr}(AB)tr(AB) with respect to AAA is BTB^TBT.

    2. B

      The derivative of tr(A2)\mathrm{tr}(A^2)tr(A2) is 2A2A2A.

    3. C

      All of the above are used.

    4. D

      The derivative of tr(A)\mathrm{tr}(A)tr(A) with respect to AAA is the identity matrix.

    Correct answer
    A

    The derivative of tr(AB)\mathrm{tr}(AB)tr(AB) with respect to AAA is BTB^TBT.

    Explanation

    One key property is ∇Atr(AB)=BT\nabla_A \mathrm{tr}(AB) = B^T∇A​tr(AB)=BT, used in the normal equation derivation.

  29. 29

    What is the significance of the ALVINN video mentioned in the lecture?

    1. A

      It showed reinforcement learning for obstacle avoidance.

    2. B

      It was an example of a supervised learning regression problem for self-driving cars.

    3. C

      It introduced the concept of a neural network.

    4. D

      It demonstrated unsupervised learning for lane detection.

    Correct answer
    B

    It was an example of a supervised learning regression problem for self-driving cars.

    Explanation

    ALVINN used supervised learning to map camera images to steering directions, a regression problem.

  30. 30

    If XXX is the design matrix of size m×(n+1)m \times (n+1)m×(n+1) and yyy is m×1m \times 1m×1, what is the dimension of XTXX^T XXTX?

    1. A

      m×(n+1)m \times (n+1)m×(n+1)

    2. B

      (n+1)×(n+1)(n+1) \times (n+1)(n+1)×(n+1)

    3. C

      m×mm \times mm×m

    4. D

      (n+1)×m(n+1) \times m(n+1)×m

    Correct answer
    B

    (n+1)×(n+1)(n+1) \times (n+1)(n+1)×(n+1)

    Explanation

    XTX^TXT is (n+1)×m(n+1) \times m(n+1)×m, so XTXX^T XXTX is (n+1)×(n+1)(n+1) \times (n+1)(n+1)×(n+1).

  31. 31

    In the context of gradient descent, what does 'batch' refer to?

    1. A

      Using no training examples and only the cost function.

    2. B

      Using a subset of training examples in one update.

    3. C

      Using all training examples in one update.

    4. D

      Using one training example in one update.

    Correct answer
    C

    Using all training examples in one update.

    Explanation

    Batch gradient descent processes the entire dataset (the whole batch) per iteration.

  32. 32

    According to the lecturer, what is a common approach to choosing the learning rate?

    1. A

      Derive it analytically from the cost function.

    2. B

      Use a line search for each iteration.

    3. C

      Always set it to 0.01 regardless of the dataset.

    4. D

      Try values on an exponential scale (e.g., 0.01, 0.02, 0.04, 0.08) and select the one that minimizes cost quickly.

    Correct answer
    D

    Try values on an exponential scale (e.g., 0.01, 0.02, 0.04, 0.08) and select the one that minimizes cost quickly.

    Explanation

    The lecturer suggests trying exponentially spaced values to find an effective learning rate.

  33. 33

    What is the term for a matrix where rows are training examples transposed?

    1. A

      Design matrix

    2. B

      Covariance matrix

    3. C

      Gram matrix

    4. D

      Feature matrix

    Correct answer
    A

    Design matrix

    Explanation

    The design matrix XXX has each row as (x(i))T(x^{(i)})^T(x(i))T.

  34. 34

    In the linear regression cost function, what is the effect of using the sum of squared errors rather than absolute errors?

    1. A

      It penalizes larger errors more heavily.

    2. B

      All of the above.

    3. C

      It always yields a convex optimization problem.

    4. D

      It corresponds to assuming Gaussian noise in the target variable.

    Correct answer
    B

    All of the above.

    Explanation

    Squared error leads to a convex problem, penalizes outliers more, and relates to Gaussian noise (as mentioned for later lectures).

  35. 35

    What does the lecturer suggest if XTXX^T XXTX is non-invertible?

    1. A

      Switch to gradient descent.

    2. B

      Set θ\thetaθ to zero.

    3. C

      Check for redundant features and remove them, or use the pseudo-inverse.

    4. D

      Add more training examples.

    Correct answer
    C

    Check for redundant features and remove them, or use the pseudo-inverse.

    Explanation

    Non-invertibility often indicates linearly dependent features; fixing that or using pseudo-inverse is recommended.

  36. 36

    In the lecture, what was the number of training examples in the Portland housing dataset?

    1. A

      47

    2. B

      49

    3. C

      100

    4. D

      50

    Correct answer
    B

    49

    Explanation

    The dataset had 49 points (m=49).

  37. 37

    What is the main takeaway from the contour plot of the cost function for linear regression?

    1. A

      The cost function is not convex.

    2. B

      Gradient descent cannot find the global minimum.

    3. C

      The cost function is convex with a single global minimum.

    4. D

      The cost function has many local minima.

    Correct answer
    C

    The cost function is convex with a single global minimum.

    Explanation

    For linear regression with squared error, J(θ) is convex (bowl-shaped) with one global minimum.

Question 1 of 37
Question 1 of 37

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent