|
|
crossvalind
Hi,
In the Help example, the crossvalind.m is used once outside the for loop. What exactly does Indices contain, the result for one partitioning or the average of K iterations?
Do I need to call crossvalind inside a for loop in order to esure that "This process is repeated K times, leaving one different fold for evaluation each time"?
|
|
0
|
|
|
|
Reply
|
sara
|
5/10/2010 12:34:06 PM |
|
> In the Help example, the crossvalind.m is used once outside the for loop.
> What exactly does Indices contain, the result for one partitioning or the
> average of K iterations?
Just take a look:
load fisheriris
indices = crossvalind('Kfold',species,10);
You'll see that it's a numeric vector containing the fold number assigned to
each row.
> Do I need to call crossvalind inside a for loop in order to esure that
> "This process is repeated K times, leaving one different fold for
> evaluation each time"?
By leaving it outside the loop you insure that the assignment of rows to
folds doesn't change. So then when you leave out one fold at a time in the
loop, you're leaving out each observation exactly once.
-- Tom
|
|
0
|
|
|
|
Reply
|
Tom
|
5/11/2010 9:15:16 PM
|
|
|
1 Replies
431 Views
(page loaded in 0.042 seconds)
|
|
|
|
|
|
|
|
|