Lsqfit

Latest version: v13.2.3

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

Scan your dependencies

Page 7 of 13

8.1

========================
MPI support for BayesIntegrator is now automatic --- ie, no need to set
parameter mpi=True (the parameter has no effect). Older code should still
work, however. See the documentation for vegas 3.2 for information about
using multiple processors.

8.0.2

==========================
Tiny change to keep lsqfit compatible with gvar v8.0 and later.

8.0.1

========================
Tiny (but somewhat conspicuous) fix in documentation.

8.0

=======================
The most significant addition is class BayesIntegrator for doing Bayesian
integrals using vegas (see the tutorial section on Bayesian Integrals, and the
new case study on Outliers and Bayesian Integrals). Bayesian integrals are
used in situations where the Gaussian approximation implicit in lsqfit breaks
down. By combining lsqfit results with vegas it becomes feasible to do these
integrals even with 10s of parameters. BayesIntegrator is built on top of
gvar.PDFIntegrator and so requires version 7.3 or later of gvar.

There are two additional changes, the second of which (caused by the first)

7.3

but they affect lsqfit:

- Function gvar.add_parameter_distribution has been added to allow new
prior distributions, in addition to log-normal and sqrt-normal. This
allows one, for example, to restrict a parameter to a particular
interval (see the Overview section on Non-Gaussian Priors).

- To signal a log-normal prior for a parameter 'c' in nonlinear_fit one must
now include an entry for prior['log(c)'] in the prior. Previously one could
leave out the parentheses in the key, using prior['logc'] instead. The
parenthesis are now essential. The same is true for sqrt-normal priors,
where one would include prior['sqrt(c)'], not prior['sqrtc'].

FIX FOR LEGACY CODE: To help convert legacy code, there is a new utility
function that adds the needed parentheses: use

prior = gvar.add_parameter_parentheses(prior)

to add parentheses to keys in dictionary prior of the form logc or sqrtdd
(which become log(c) or sqrt(dd)) in dictionary prior.

Other changes are behind the scenes: eg, more tests, more examples.

7.1

==================================
This version was made necessary by backwards incompatible changes in the
GSL library (with v2) used by lsqfit to do the fitting. The resulting
change in lsqfit *is* backwards compatible. Versions 7.1 and 7.1.0 are
the same.

- lsqfit now compiles with either of GSL versions 2.1 or 1.16. If 2.1 is
used there are two (minor?) enhancements: 1) there is a more sophisticated
stopping condition using parameter tol in place of abstol and reltol
(see multifit documentation); and 2) there is a new fitting algorithm
lmniel (in addition to lmsder and lmder) that is supposed to be faster
when fitting very large amounts of data with relatively few parameters.
Parameters abstol and reltol continue to work but are discouraged in
favor of tol=(reltol, abstol) or tol=reltol.

Page 7 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.