mercredi 28 janvier 2015

R test categorical column

I want to create test set using "createDataPartition" in caret (Or other method) which I can do based on label column in my data set. But my additional requirement is that my data has one categorical column (say: ID with values as ID1, ID2....ID10 for examples in data set) I want that all the observations with particular ID should be either in train set or in test set. How to do it. many thanks


Aucun commentaire:

Enregistrer un commentaire