
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Question: Given a collection of data points (xi, yi), for i = 1, ..., N determine the value of a in the function y(x) = log(ax) that best fits this data in a least-square sense.
Solution: The sum of the square of the residuals (ie the cost function) for this fitting function is a function of a only:
Sr(a) =
i=
[yi โ log(axi)]^2.
To minimize Sr with respect to a, we solve for the value of a such that โSr/โa = 0.
โSr โa
i=
[yi โ log(axi)]
a
which can be solved for log(a) as
โ^ N
i=
log(a) =
i=
[yi โ log(xi)].
Finally, we find the required value of a,
a = exp
i=
[yi โ log(xi)]