**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} + θ_{1}x” 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)}) |