I achieved simple single regression using math.net regression method like this:
var xdata = new double[] { 10, 20, 30, 40, 50 };
var ydata = new double[] { 15, 20, 25, 55, 95 };
var X = DenseMatrix.CreateFromColumns(new[] { new DenseVector(xdata.Length, 1), new DenseVector(xdata) });
var y = new DenseVector(ydata);
var p = X.QR().Solve(y);
var a = p[0];
var b = p[1];
MessageBox.Show(a.ToString(), "Test");
MessageBox.Show(b.ToString(), "Test");
Question is: What can I apply multiple regression with this method? So, I have also zdata
array and I want to use this for multiple regression.