what's wrong with this Symfit example?

I'm trying to understand how to use symfit for fitting some data and I run the next example:

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()

From this page: https://symfit.readthedocs.io/en/stable/fitting_types.html and I'm getting the next error:

AttributeError: 'Derivative' object has no attribute 'derivative_count'

What's wrong with the example?

Upvotes: 0

Views: 319

Answers (0)

Related Questions