cross validation
cross validation
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
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: cross validation
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.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 ?