Hello I am trying to get multiple regression with math.net and I am a little confused.
var xdata = new DenseMatrix(
new double[,]{{1, 36, 66, 45, 32},
{1, 37, 68, 12, 2},
{1, 47, 64, 78, 34},
{1, 32, 53, 56, 32},
{1, 1, 101, 24, 90}});
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];
I guess I don't understand Math.Net, any help with this would be great. Basically I have multiple x and a single y and need to get the coefficient data from them.