Skip to content
Prev 273136 / 398506 Next

difference between createPartition and createfold functions

Hi,
On Sun, Oct 2, 2011 at 3:54 PM, <bby2103 at columbia.edu> wrote:
Sorry, I'm a bit confused now as to what you are after.

You don't pass in a data.frame into any of the
createFolds/DataPartition functions from the caret package.

You pass in a *vector* of labels, and these functions tells you which
indices into the vector to use as examples to hold out (or keep
(depending on the value you pass in for the `returnTrain` argument))
between each fold/partition of your learning scenario (eg. cross
validation with createFolds).

You would then use these indices to keep (remove) the rows of a
data.frame, if that is how you are storing your examples.

Does that make sense?

-steve