I'm just trying to fit a curve to a power-law dataset. I'm used to using scipy for curve fitting and was wondering how to accomplish the same task with powerlaw.
so lets say I have a function to get power law data
def plaw(x,a,b):
return b*x**a
If I was using scipy I would just use
pars,cov = curve_fit(f=plaw,xdata=x,ydata=y,p0=[0,0],bounds=(-np.inf,np.inf))
and then send the pars(a,b) into plaw and and I can plot the fitted line.
My question is how to I get these parameters using powerlaw?