double[][] INPUT = { {3}, {6}, {4}, {5} };
double[][] IDEAL = { {0}, {-3}, {-1}, {-2} };
MLDataSet data = new BasicMLDataSet(INPUT,IDEAL);
LinearRegression lin = new LinearRegression(1);
TrainLinearRegression train = new TrainLinearRegression(lin,data);
train.iteration();
System.out.println("w0 = " + Format.formatDouble(lin.getWeights()[0],2));
System.out.println("w1 = " + Format.formatDouble(lin.getWeights()[1],2));
System.out.println("Error: " + lin.calculateError(data));
}