return buf.toString();
}
StringBuffer model = new StringBuffer(m_neuralNodes.length * 100);
//just a rough size guess
NeuralNode con;
double[] weights;
NeuralConnection[] inputs;
for (int noa = 0; noa < m_neuralNodes.length; noa++) {
con = (NeuralNode) m_neuralNodes[noa]; //this would need a change
//for items other than nodes!!!
weights = con.getWeights();
inputs = con.getInputs();
if (con.getMethod() instanceof SigmoidUnit) {
model.append("Sigmoid ");
}
else if (con.getMethod() instanceof LinearUnit) {
model.append("Linear ");
}
model.append("Node " + con.getId() + "\n Inputs Weights\n");
model.append(" Threshold " + weights[0] + "\n");
for (int nob = 1; nob < con.getNumInputs() + 1; nob++) {
if ((inputs[nob - 1].getType() & NeuralConnection.PURE_INPUT)
== NeuralConnection.PURE_INPUT) {
model.append(" Attrib " +
m_instances.attribute(((NeuralEnd)inputs[nob-1]).
getLink()).name()