File egFile = new File(FileUtil.forceExtension(
targetCSVFile.toString(), "eg"));
analyst = new EncogAnalyst();
AnalystWizard wizard = new AnalystWizard(analyst);
boolean headers = dialog.getHeaders().getValue();
AnalystFileFormat format = dialog.getFormat();
wizard.setMethodType(dialog.getMethodType());
wizard.setTargetField(dialog.getTargetField());
String m = (String)dialog.getMissing().getSelectedValue();
if( m.equals("DiscardMissing") ) {
wizard.setMissing(new DiscardMissing());
} else if( m.equals("MeanAndModeMissing") ) {
wizard.setMissing(new MeanAndModeMissing());
} else if( m.equals("NegateMissing") ) {
wizard.setMissing(new NegateMissing());
} else {
wizard.setMissing(new DiscardMissing());
}
wizard.setGoal(dialog.getGoal());
wizard.setLagWindowSize(dialog.getLagCount().getValue());
wizard.setLeadWindowSize(dialog.getLeadCount().getValue());
wizard.setIncludeTargetField(dialog.getIncludeTarget()
.getValue());
wizard.setRange(dialog.getRange());
wizard.setTaskNormalize(dialog.getNormalize().getValue());
wizard.setTaskRandomize(dialog.getRandomize().getValue());
wizard.setTaskSegregate(dialog.getSegregate().getValue());
wizard.setTaskBalance(dialog.getBalance().getValue());
wizard.setTaskCluster(dialog.getCluster().getValue());
wizard.wizard(targetCSVFile, headers, format);
} catch (EncogError e) {
EncogWorkBench.displayError("Error Generating Analyst Script",
e);
} finally {