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.

Re: REQUEST: Q7 HowTo
**Spoiler Alert: This post contains the full solution**
First let's make sure we have the right picture. https://i.imgsafe.org/0e07a8f7bb.png 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! 
All times are GMT 7. The time now is 01:21 PM. 
Powered by vBulletin® Version 3.8.3
Copyright ©2000  2020, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. AbuMostafa, Malik MagdonIsmail, and HsuanTien Lin, and participants in the Learning From Data MOOC by Yaser S. AbuMostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.