.determineInputFormat(sourceID);
final CSVFormat outputFormat = getScript().determineOutputFormat();
// prepare to segregate
final boolean headers = getScript().expectInputHeaders(sourceID);
final SegregateCSV seg = new SegregateCSV();
seg.setScript(getScript());
getAnalyst().setCurrentQuantTask(seg);
for (final AnalystSegregateTarget target : getScript().getSegregate()
.getSegregateTargets()) {
final File filename = getScript().resolveFilename(target.getFile());
seg.getTargets().add(
new SegregateTargetPercent(filename, target.getPercent()));
// mark generated
getScript().markGenerated(target.getFile());
EncogLogging.log(EncogLogging.LEVEL_DEBUG, "target file:"
+ target.getFile() + ", Percent: "
+ Format.formatPercent(target.getPercent()));
}
seg.setReport(new AnalystReportBridge(getAnalyst()));
seg.analyze(sourceFile, headers, inputFormat);
seg.setOutputFormat(outputFormat);
seg.process();
getAnalyst().setCurrentQuantTask(null);
return seg.shouldStop();
}