我在python中有以下信息(数据帧)
product baskets scaling_factor
12345 475 95.5
12345 108 57.7
12345 2 1.4
12345 38 21.9
12345 320 88.8
Run Code Online (Sandbox Code Playgroud)
我想运行以下非线性回归并估计参数.
a,b和c
我想要适合的等式:
scaling_factor = a - (b*np.exp(c*baskets))
Run Code Online (Sandbox Code Playgroud)
在sas中我们通常运行以下模型:(使用高斯牛顿法)
proc nlin data=scaling_factors;
parms a=100 b=100 c=-0.09;
model scaling_factor = a - (b * (exp(c*baskets)));
output out=scaling_equation_parms
parms=a b c;
Run Code Online (Sandbox Code Playgroud)
有没有类似的方法来估计Python中的参数使用非线性回归,我怎么能看到python中的情节.