# Best fit for scattered x and y data polynomial vs machine learning

I have data set in which many parameters (a,b,c,d,y,z) are dependent on other parameter (x). When I plot these parameters against x I get a scatter plot. Please see figure for (a vs x) plot. I can use MATLAB to apply basic fit (cubic, quadratic) and get equation out of it but the fitted curve doesn't cover all possible values of dependent parameters. Now, I have no experience with machine learning but what I have read online is using machine learning algorithms better fitting curve can be obtained.

Can anyone please provide me details how can I create best fit for my problem to get the equation of parameters that can cover almost all possible values of them. Should I apply machine learning algorithm for my problem? Am I going in right direction or there could be any other solution for this problem?

Thanks

• also check here by @MatthewDrury – hxd1011 Jun 1 '17 at 16:14
• Possible duplicate of How to chose the order for polynomial regression? – hxd1011 Jun 1 '17 at 16:23
• I wouldn't use a polynomial for this. Consider local linear regression or spline models, but anything do you is dangerous out on the far right with almost no points -- really you should be using domain knowledge and what the model will be used for to inform the choice of appropriate model here; I'd suggest you may also need a robust fit – Glen_b Jun 2 '17 at 4:31
• Take the log of the y-axis data, shift the curve to the right and take the log of the resulting >0 x-axis data by an offset that makes for the best linear fit between $\ln(x-\delta x)$ and $\ln(y)$. – Carl Jun 3 '17 at 18:48