title: Scipy fit curve by points
body: <p>I'm trying to fit curve with <code>scipy.optimize.curve_fit</code>.</p>
  <p>my data:</p>
  <pre><code>x = [3,4,5,6,8,10,12]
  y = [30,25,23,22,21,18,14]
  </code></pre>
  <p>func like this</p>
  <pre><code>def func(x, b, c, d, a):
          return b * (x+a)**c + d
  </code></pre>
  <p>curve_fit parameters</p>
  <pre><code>bounds=[-50,50],  p0 = [50,-1,10,1],  maxfev = 50000)
  </code></pre>
  <p><img src="https://i.stack.imgur.com/iMY3p.png" alt="link to curve" /></p>
  <p>But as you see, the curve is not very accurate. I assume that I need to use another type of function. Or maybe there another tool for this task? All I need to get formula y = F(x) and predict y-values not only on [3,12], under 3 and above 12 too.</p>
  <p>p.s. I have several such x-y lists and maybe there are different functions type in different data</p>