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(θ0,θ1)=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 False | Statement | Explanation |
---|---|---|
False | For 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(θ0,θ1)=0. It is not necessary that y(i) for all our examples. |
False | Gradient descent is likely to get stuck at a local minimum and fail to find the global minimum. | none |
False | For this to be true, we must have θ0=0 and θ1=0 so that hθ(x)=0 | If J(θ0,θ1)=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). |
True | Our 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 False | Statement | Explanation |
---|---|---|
False | We 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 |
False | This is not possible: By the definition of J(θ0,θ1), it is not possible for there to exist θ0 and θ1 so that J(θ0,θ1)=0 | None |
True | For these values of θ0 and θ1 that satisfy J(θ0,θ1)=0, we have that hθ(x(i))=y(i) for every training example (x(i),y(i)) |