Skip to main content

Least-Squares Minimization with Bounds and Constraints

Project description

A library for least-squares minimization and data fitting in Python. Built on top of scipy.optimize, lmfit provides a Parameter object which can be set as fixed or free, can have upper and/or lower bounds, or can be written in terms of algebraic constraints of other Parameters. The user writes a function to be minimized as a function of these Parameters, and the scipy.optimize methods are used to find the optimal values for the Parameters. The Levenberg-Marquardt (leastsq) is the default minimization algorithm, and provides estimated standard errors and correlations between varied Parameters. Other minimization methods, including Nelder-Mead’s downhill simplex, Powell’s method, BFGS, Sequential Least Squares, and others are also supported. Bounds and contraints can be placed on Parameters for all of these methods.

In addition, methods for explicitly calculating confidence intervals are provided for exploring minmization problems where the approximation of estimating Parameter uncertainties from the covariance matrix is questionable.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lmfit-0.9.3.tar.gz (1.1 MB view details)

Uploaded Source

File details

Details for the file lmfit-0.9.3.tar.gz.

File metadata

  • Download URL: lmfit-0.9.3.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lmfit-0.9.3.tar.gz
Algorithm Hash digest
SHA256 74db85a245efa0e4f4eb161291b995a3e9ec83e9c35aa3babbf25e922fe9d3e2
MD5 f43c3dcd0d939ac38024d95bf4722f23
BLAKE2b-256 c64a75f188877264b6f9e8f2d68f213d2c7329bcb3a86be013fa11c1d256990e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page