public static Vector getLinearRegressionCoefficients(StateValuePair[] stateValuePairs) {
		if (stateValuePairs.length == 0)
			throw new IllegalArgumentException();
		
		double[] coefficients = new double[stateValuePairs[0].getState().getDimension()];
		NNR nn = new NNR(new int[] {coefficients.length, 1});
		
		double[][] inputValues = new double[stateValuePairs.length][coefficients.length];
		double[][] outputValues = new double[stateValuePairs.length][1];
		
		for (int i = 0; i < stateValuePairs.length; i++) {
			inputValues[i] = stateValuePairs[i].getState().getValues();
			outputValues[i][0] = stateValuePairs[i].getValue();
		}
		
		nn.train(inputValues, outputValues, 15000, 0);
		double[] weights = nn.getWeights();
		
		for (int i = 0; i < coefficients.length; i++) {
			coefficients[i] = weights[i];
		}
		
		return new Vector(coefficients);
	}