I'm trying to fit curve with scipy.optimize.curve_fit
.
my data:
x = [3,4,5,6,8,10,12]
y = [30,25,23,22,21,18,14]
func like this
def func(x, b, c, d, a):
return b * (x+a)**c + d
curve_fit parameters
bounds=[-50,50], p0 = [50,-1,10,1], maxfev = 50000)
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.s. I have several such x-y lists and maybe there are different functions type in different data