这个Symfit示例出了什么问题?

时间:2019-09-15 00:59:05

标签: python python-3.x numpy symfit

我试图了解如何使用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_count”

该示例出了什么问题?

0 个答案:

没有答案