So I need to fit some vectorized data into a 3rd degree polynomial, however I can't find any libraries in C# that are able to do that.
Essentially, x is a vector with 3 elements ([R, G, B]), and the final equation for the model is as follows:
I need to obtain the l0, l1, l2, ..., l19 coefficients.
I looked at some popular algebra libraries (Math.NET, Meta.Numerics, etc), and most of them can perform LinearRegression, Multi Linear Regression, and Polynomial Regression. However, if I didn't miss anything, none can perform Multi Polynomial Regression.
I was able to accomplish this in python using scikit.learn, but I found nothing for C#.
Thanks in advance!
Any library that can solve a linear system of equations will do.
Take the i-th equation (1) below and form it as a linear system of equations (2)
For example (3) the i-th row has known Ri, Gi, Bi and known Li.
Then use the linear solved for the unknown coefficients in vector x. Since you are having more rows than unknown coefficients, then use the left pseudo-inverse.