//We have added the ability to include wider neurons on the sample space boundary which greatly
//improves fitting to flats
boolean includeEdgeRBFs = true;
//General setup is the same as before
RadialBasisPattern pattern = new RadialBasisPattern();
pattern.setInputNeurons(dimensions);
pattern.setOutputNeurons(1);
//Total number of neurons required.
//Total number of Edges is calculated possibly for future use but not used any further here
int numNeurons = (int)Math.pow(numNeuronsPerDimension, dimensions);
int numEdges = (int)(dimensions * Math.pow(2, dimensions - 1));
pattern.addHiddenLayer(numNeurons);
RBFNetwork network = (RBFNetwork)pattern.generate();
//Position the multidimensional RBF neurons, with equal spacing, within the provided sample space from 0 to 1.
network.setRBFCentersAndWidthsEqualSpacing(0, 1, RBFEnum.Gaussian, volumeNeuronWidth, includeEdgeRBFs);
//Create some training data that can not easily be represented by gaussians