Regression with least square curve fitting