我试图了解如何使用 symfit 来拟合一些数据,然后运行下一个示例:
from symfit import Parameter, Variable, exp
from symfit.core.objectives import LogLikelihood
import numpy as np
# Define the model for an exponential distribution (numpy style)
beta = Parameter('beta')
x = Variable('x')
model = (1 / beta) * exp(-x / beta)
# Draw 100 samples from an exponential distribution with beta=5.5
data = np.random.exponential(5.5, 100)
# Do the fitting!
fit = Fit(model, data, objective=LogLikelihood)
fit_result = fit.execute()
从这个页面:https://symfit.readthedocs.io/en/stable/fitting_types.html我收到下一个错误:
AttributeError:“Derivative”对象没有属性“derivative_count”
这个例子有什么问题?