tBuLi / symfit

Symbolic Fitting; fitting as it should be.
http://symfit.readthedocs.org
MIT License
233 stars 17 forks source link

Minimizer Switch NameError: name 'NelderMead' is not defined #302

Closed richardgalt closed 4 years ago

richardgalt commented 4 years ago

Trying to switch minimizes throws the following error. NameError: name 'NelderMead' is not defined.

` from symfit import parameters, variables, Fit, Model import numpy as np

xdata = np.array([1.0, 2.0, 3.0, 4.0, 5.0]) ydata = np.array([2.3, 3.3, 4.1, 5.5, 6.7]) yerr = np.array([0.1, 0.1, 0.1, 0.1, 0.1])

a, b = parameters('a, b') x, y = variables('x, y') model = Model({y: a * x + b})

fit = Fit(model, x=xdata, y=ydata, sigma_y=yerr, minimizer=[NelderMead, BFGS]) fit_result = fit.execute() print(fit_result) `

Jhsmit commented 4 years ago

try importing them by adding:

from symfit.core.minimizers import *