Solved – Model fitting to data by using machine learning algorithms

fittingmachine learningregression

I am trying to fit an equation to data. I know the form of the equation but I need to know constants parameters in the equation. I used non-linear fitting and optimization techniques but I could not get promising results.

This can be a dump question but I wonder if it is possible to fit an equation to data by using machine learning algorithms such as guassion process, neural network and so.

For example, I have data and I wanna fit this equation: a*sin(x) +b*cos(x). Is it possible to find the constants of "a" and "b"?

Best Answer

If I understand your question correctly, and as long as I'm not making an incorrect assumption, you could accomplish this using multivariable linear regression with transformations on the independent variables.

Your $X$ variables would be: $X_{1}=\sin(x)$ and $X_{2}=\cos(x)$

and then you can find the coefficients $b_{1}$ and $b_{2}$ by fitting the equation $$Y=b_{1}X_{1} + b_{2}X_{2}$$

Related Question