DataIndexer testDataIndexer = new OnePassRealValueDataIndexer(rvfes1,1);
// when
QNModel trainedModel = new QNTrainer(5, 700, true).trainModel(ITERATIONS, testDataIndexer);
ByteArrayOutputStream modelBytes = new ByteArrayOutputStream();
GenericModelWriter modelWriter = new GenericModelWriter(trainedModel,
new DataOutputStream(modelBytes));
modelWriter.persist();
modelWriter.close();
GenericModelReader modelReader = new GenericModelReader(new BinaryFileDataReader(
new ByteArrayInputStream(modelBytes.toByteArray())));
AbstractModel readModel = modelReader.getModel();
QNModel deserModel = (QNModel) readModel;