Question 5

Suppose that for some linear regression problem (say, predicting housing prices as in the lecture), we have some training set, and for our training set we managed to find some θ0, θ1 such that J(θ01)=0.

Which of the statements below must then be true? (Check all that apply.)

  • For this to be true, we must have y(i)=0 for every value of i=1,2,…,m.
  • Gradient descent is likely to get stuck at a local minimum and fail to find the global minimum.
  • For this to be true, we must have θ0=0 and θ1=0 so that hθ(x)=0
  • Our training set can be fit perfectly by a straight line, i.e., all of our training examples lie perfectly on some straight line.

Answers:

True or FalseStatementExplanation
FalseFor this to be true, we must have y(i)=0 for every value of i=1,2,…,m.So long as all of our training examples lie on a straight line, we will be able to find θ0 and θ1) so that J(θ01)=0. It is not necessary that y(i) for all our examples.
FalseGradient descent is likely to get stuck at a local minimum and fail to find the global minimum.none
FalseFor this to be true, we must have θ0=0 and θ1=0 so that hθ(x)=0If J(θ01)=0 that means the line defined by the equation “y = θ0 + θ1x” perfectly fits all of our data. There’s no particular reason to expect that the values of θ0 and θ1 that achieve this are both 0 (unless y(i)=0 for all of our training examples).
TrueOur training set can be fit perfectly by a straight line, i.e., all of our training examples lie perfectly on some straight line.None

Other Options:

True or FalseStatementExplanation
FalseWe can perfectly predict the value of y even for new examples that we have not yet seen. (e.g., we can perfectly predict prices of even new houses that we have not yet seen.)None
FalseThis is not possible: By the definition of J(θ01), it is not possible for there to exist θ0 and θ1 so that J(θ01)=0None
TrueFor these values of θ0 and θ1 that satisfy J(θ01)=0, we have that hθ(x(i))=y(i) for every training example (x(i),y(i))

Leave a Comment

Your email address will not be published. Required fields are marked *