I am trying to fit a function to a set of variables using the ODR function. The task at hand doesn’t seem to be that difficult, but the whole idea of an estimator really confuses me. I read the description of the function and all of its inputs, but I can’t quite understand the significance of the estimator. I wanted it to be calculated somehow, instead of just guessing it myself, but the functions I tried, linregress (can be used for linear function only), and curve_fit (also requires an estimator, but assumes the value as 1 if not provided) were of no help. What does the estimator mean? How do I find one? How do I get the ODR function to be as precise as possible? Where can I find such info? Thanks.
EDIT: here's a piece of the code
def fun(kier, arg):
'''
Function to fit
:param kier: list of parameters
:param arg: argument of the function fun
:return y: value of function in x
'''
y =kier[0]*arg +1 #+kier[1]
return y
dane = RealData(x=zx, y=zy, sx=dx, sy=dy)
model = Model(fun)
#kier,cross,none,none,none=linregress(zx_mean,zy_mean) #this is a method used to estimate the parameters, replaced by curve_fit.
popt, pcov = curve_fit(fun, zx, zy)
on = ODR(dane, model,beta0=[popt[0]])
output = on.run()