cross validation

The engine.
Post Reply
lizbona
Posts: 9
Joined: Mon Mar 22, 2010 12:38 pm

cross validation

Post by lizbona »

Hi, I need to implement cross-validation method using jSmile(java based) library. I readed previous subject about cross validation. But I don't know how to split the dataset into two subsets(training and testing). Will I have to read all the data from file, then split it into my program, save it into temp file and then reread this file again using jSmile's DataSet.readFile ? Or maybe there is a simpler way to do this, very helpfull would be method that splits existing DataSet into user-definied subset. Please help
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: cross validation

Post by shooltz[BayesFusion] »

Will I have to read all the data from file, then split it into my program, save it into temp file and then reread this file again using jSmile's DataSet.readFile ?
There's no need to go through the filesystem. You can split the dataset in memory by creating two (or more) subsets with from the original data - see the DataSet methods like addEmptyRecord, addIntVariable, addFloatVariable, setInt, setFloat.
Post Reply