I'm working with Multiple Linear Regression in C# using Accord.NET, I followed the example, the method needs 2 arguments inputs which is a 2d array, and outputs which is a 1d array, the two arrays must have the same length.
public static double[] RegressionLineaire(double[][]input,double[]output)
{
double[] coeff = new double[40];
var ols = new OrdinaryLeastSquares();
{
ols.UseIntercept = true;
};
Console.WriteLine("inputs length = " + input.Length + " outputs
length = " + output.Length);
MultipleLinearRegression regression = ols.Learn(input, output);
coeff = regression.Weights;
return coeff;
}
the inputs and outputs have the same length but I get this exception
System.InvalidOperationException : 'Matrix is rank deficient.'