Correction k=1 does not refer to itself but to one of the nearest points.
@AlexanderIhler6 жыл бұрын
It does refer to itself in the case being discussed ("training error"), in which the training data is used to build the learner, and the learner is then applied again to the training data. Then, the nearest point to each x^(i) will be the copy of x^(i) in the stored data. You are thinking of "leave one out cross-validation", in which we explicitly exclude the test data point from the training set, for the purpose of getting a less biased estimate of test error (see other lectures).
@rujinzhang77465 жыл бұрын
@@AlexanderIhler Hi Professor, may I ask why the predictive error for test set increases when K increases (after it decreases for a while)? Thanks much! Jean
@vishalvenkat64 жыл бұрын
What do you do if when using the K = 1 classifier, there are two data points that have an equal distance from the test data? Which class would the test data point be belong to?