#1




REQUEST: Q7 HowTo
Can anybody share the rundown to get the answer? I can't grasp a way to do it. Plus it gets frustrating because I feel like it's more of an algebra problem rather than a Machine Learning one.

#2




Re: REQUEST: Q7 HowTo
**Spoiler Alert: This post contains the full solution**
First let's make sure we have the right picture. So and are sitting on the axis, while is somewhere to the right of the axis at height 1. For this dataset, leaveoneout validation entails fitting our model to two of the points, then testing the fit on the third. Let's start with the constant model, . When we fit this model on two data points, will simply be the average of the coordinates of the two points.
The overall crossvalidation error is the average of the three individual errors, , as you can verify. Looking ahead, we would like to find the value of that makes . Let's turn to the linear model, . The easy case is when is left out. The resulting fitted line is simply and the error is . Things get more complicated when is left out. We need to find the equation of the line through and . Using slopeintercept form and rearranging, you can check that the fitted line has slope equal to its intercept, . The error on is . A similar derivation yields . Putting it all together gives us . If we set this equal to 1/2 (the error from the constant model), we have a quadratic equation in one unknown, which we can solve using the quadratic formula (alternatively, dumping the whole equation into WolframAlpha gives you the roots directly). Hope that helped! 
Thread Tools  
Display Modes  

