C# – Least Squares C# library

c++mathnumerical

I am looking to perform a polynomial least squares regression and am looking for a C# library to do the calculations for me.

I pass in the data points and the degree of polynomal (2nd order, 3rd order, etc) and it returns either the C0, C1, C2 etc. constant values or the calculated values "predictions".

Note: I am using Least Squares to create some forecasting reports for disk usage, database size and table size.

Best Solution

Here is a link for C# code on to do exactly this: http://www.trentfguidry.net/post/2009/08/01/Linear-Regression-of-Polynomial-Coefficients.aspx

Good luck!

Edit: Apparently the above link is broken. I made another solution awhile back: http://procbits.com/2011/05/02/linear-regression-in-c-sharp-least-squares/

Related Question