**Consider the following training set of m=4 training examples: question 2 – Machine Learning Week 1 Quiz 2**

Consider the following training set of m=4 training examples:

x | y |
---|---|

1 | 0.5 |

2 | 1 |

4 | 2 |

0 | 0 |

Consider the linear regression model h_{θ}(x)=θ_{0}+θ_{1}x. What are the values of θ_{0} and θ_{1} that you would expect to obtain upon running gradient descent on this model? (Linear regression will be able to fit this data perfectly.)

- θ
_{0}=0.5,θ_{1}=0 **θ**_{0}=0.5,θ_{1}=0.5- θ
_{0}=1,θ_{1}=0.5 - θ
_{0}=0,θ_{1}=0.5 - θ
_{0}=1,θ_{1}=1

Answer:

θ_{0}=0,θ_{1}=0.5

As J(θ_{0},θ_{1})=0, y = h_{θ}(x) = θ_{0} + θ_{1}x. Using any two values in the table, solve for θ_{0}, θ_{1}.