Symfit

Latest version: v0.5.6

Safety actively analyzes 629678 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.3.0

After a long time, a brand new version. To throw around some prime marketing: "Nothing has changed - except everything".

The way models are handled has been completely redefined, allowing for great syntactic sugar such as:
- named dependent variables:

python
x, y = variables('x, y')
model = {y: a * x**2}

- And assigning data by name:

python
fit = Fit(model, x=xdata, y=ydata, sigma_y=sigma)


Furthermore this version finally comes with documentation of all the objects in the API, so symfit will finally be more useable and hopefully more easy to contribute to.

One downside: Python 2 support has been dropped in this version. I don't have the time to support both versions of Python, and frankly Python 3 just offers some language features I don't want to do without anymore.

0.2.6

The previous version introduced fitting with weights. Allthough the correct values were found for the parameters, it turns out that the errors in the parameters were grossly overestimated. It was caused by a disconnect between the residuals returned by `scipy.optimize.leastsq` and what I assumed those residuals to be. This version fixes this problem, and also includes some other non-fundamental fixes.

**Important**: the errors in parameters are now the same as given by `scipy.optimize.curve_fit` with `absolute_sigma=True` because this is always larger than `absolute_sigma=False` and it's better to overestimate errors when in doubt. I would love some feedback on which of the two is correct when dealing with real data with measurement errors. So if you know anything on this topic, please join the discussion here: https://github.com/tBuLi/symfit/issues/22

I do not wan't to simply add a keyword equivalent to `absolute_sigma` because I consider it to be unpythonic and very unclear as to what it does.

0.2.5

It is now possible to do least squares fitting with weights. Two keywords have been included to make this possible: `weights` and `sigma`. Only one of the two can be provided, and they must have the same shape as `ydata`.

Example:

python
from symfit.api import Variable, Parameter, Fit

0.2.4

This release introduced some great new features. Most important among those are the return of the `scipy.optimize.minimize` wrappers `Minimize` and `Maximize`.
Furthermore, the `Likelihood` object allows fitting using the principle of maximum likelihood.
Lastly, submodels can now be evaluated more easely than ever before, allowing the following:

python
pop_1 = A_1 * exp(-(x - x0_1)**2/(2 * sig_1**2))
pop_2 = A_2 * exp(-(x - x0_2)**2/(2 * sig_2**2))
model = pop_1 + pop_2

fit = Fit(model, xdata, ydata)
fit_result = fit.execute()

y = model(x=xdata, **fit_result.params)
y_1 = pop_1(x=xdata, **fit_result.params)

0.2.2

Bugfix release.

Changelog
- fixed a fatal bug which appears in cases where the variance in parameters could not be calculated. This typically happens in models with a lot of parameters.
- bug when using parameter names with underscores fixed.
- more metadata in setup.py

0.2.1

Stable release.
This has some minor changes under the hood as compared to previous versions, but no changes to the API.

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.