import org.encog.util.benchmark.RandomTrainingFactory;
public class BinaryVsMemory {
private static int evalMemory()
{
final BasicMLDataSet training = RandomTrainingFactory.generate(1000,
10000, 10, 10, -1, 1);
final long start = System.currentTimeMillis();
final long stop = start + (10*Evaluate.MILIS);
int record = 0;
MLDataPair pair = BasicMLDataPair.createPair(10, 10);
int iterations = 0;
while( System.currentTimeMillis()<stop ) {
iterations++;
training.getRecord(record++, pair);
if( record>=training.getRecordCount() )
record = 0;
}
System.out.println("In 10 seconds, the memory dataset read " +
Format.formatInteger( iterations) + " records.");