-2

I have set of data points shown by the solid markers, as shown in figure and I would like to fit a curve of the form:

enter image description here enter image description here

That means for each of the lines I need equations of the form:

enter image description here

Known values are y1, y2, y3 and x, unknown parameters are c, A1, A2, A3, n. How can this be done in Python?

Tom Kurushingal
  • 6,086
  • 20
  • 54
  • 86
  • 1
    possible duplicate of [Fitting an exponent in Python](http://stackoverflow.com/questions/28675145/fitting-an-exponent-in-python) – Falko Feb 26 '15 at 09:48
  • Kindly specify input and output. Which values are given (e.g. x,y,n)? Which are your fitting parameters (e.g c, A)? – BerndGit Feb 26 '15 at 11:43
  • @BerndGit Known values are y1, y2, y3 and x, unknown parameters are c, A1, A2, A3, n. – Tom Kurushingal Feb 26 '15 at 12:49
  • This question looks strange: Based on you last statement you could calculate: ´c*A1^n = y1 / exp(x)´, or if you select on c and n: ´A1 = log( y1 / (c*exp(x)) ) / log (n)´ – BerndGit Feb 26 '15 at 13:03

1 Answers1

0

Your system is overdetermined as written. For each i = 1, 2, 3, fitting y_i / exp(x) independently gives an estimate for the coefficient c A_i^n.

There is probably some additional relation between your variables.

ev-br
  • 24,968
  • 9
  • 65
  • 78