I am not sure, but I think you are talking about the least square method
9.4m questions
12.2m answers