protected double objectiveFunction() throws NNException {
		double result = 0;
		for (Pattern<?,?> pattern : patterns) {
			List<Double> processed = network.process(pattern.getInputSignal());
			for (int i = 0; i < processed.size(); i++) {
				result += Math.pow(processed.get(i).doubleValue() - pattern.getOutputSignal().get(i).doubleValue(), 2);
			}
		}
		return result;
	}