Homepage › Solution manuals › Yaser Abu-Mostafa › Learning from Data › Exercise 6.6
Exercise 6.6
Answers
In a 10-fold cross validation, suppose we have data folds as , each fold will have data points. For a given and a given fold , for each point in , we need compute its distance with all other points in dimension, which requires computations. We then need select the smallest distances, which requires computations. So for each point in fold , we need computations.
We need to do the same for all points in fold , so the total computation for a given fold is , with 10 folds, we have total cost of for a given .
Now sum up over , we have the total cost
The first term is approximately on the order of
For the second term, we have
By Sterling approximation formula, we have
so
Then
Adding up with the first term, we have