Least Squares Fitting - Logarithmic

1.9k Views Asked by At

Is there any software that will fit a set of 2D points using a logarithmic curve?

I found this, which looks like the formulas I need, but I don't think I have a fancy enough calculator to solve that for me.

WolframAlpha has a LeastSquares[] function, but it looks like it only does linear regressions.

2

There are 2 best solutions below

0
On BEST ANSWER

Here's an example of what you're trying to do in Wolfram Alpha. I think you can do the same thing in Mathematica using similar, or identical notation.

5
On

I wouldn't be surprised if Wolfram Alpha is actually doing what Ross suggested: transform the $x$ data by $t_j = \log(x_j)$. Then $y = a \log(b x)$ becomes $y = a t + c$ where $t = \log(x)$ and $c = a \log(b)$. Thus this becomes a linear least-squares problem.