.getInstance().getMainWindow());
dialog.setActivationFunctionHidden(new ActivationTANH());
dialog.setActivationFunctionOutput(new ActivationTANH());
if (dialog.process()) {
FeedForwardPattern feedforward = new FeedForwardPattern();
feedforward.setActivationFunction(dialog.getActivationFunctionHidden());
feedforward.setActivationOutput(dialog.getActivationFunctionOutput());
feedforward.setInputNeurons(dialog.getInputCount().getValue());
for (int i = 0; i < dialog.getHidden().getModel().size(); i++) {
String str = (String) dialog.getHidden().getModel()
.getElementAt(i);
int i1 = str.indexOf(':');
int i2 = str.indexOf("neur");
if (i1 != -1 && i2 != -1) {
str = str.substring(i1 + 1, i2).trim();
int neuronCount = Integer.parseInt(str);
feedforward.addHiddenLayer(neuronCount);
}
}
feedforward.setInputNeurons(dialog.getInputCount().getValue());
feedforward.setOutputNeurons(dialog.getOutputCount().getValue());
return feedforward.generate();
}
return null;
}