# Leave one out cross validation and set seed in R

I am having trouble to understand where and how many times to use set.seed().

I am performing a leave-one out crossvalidation on a set with 120 classified variables to predict another 300 of unknown class. Should I set the seed at the beginning of the code or at the beginning of each iteration of the leave-one-out cross validation in order to guarantee a run that can be repeated?

Thanks for any help and explanations.

Leave-one-out cross validation is usually complete in the sense that one iteration (consisting of $n$ surrogate models tested with one left out case each) covers all possible surrogate model of $n - 1$ cases plus the one test case combinations. Doing another iteration of this will result in exactly the same predicitons unless your classifier is non-deterministic.