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 constraints 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-1.0.3.tar.gz (292.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: lmfit-1.0.3.tar.gz
  • Upload date:
  • Size: 292.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for lmfit-1.0.3.tar.gz
Algorithm Hash digest
SHA256 d067c3ea501f035af5d3c079e6e6e35dc3cc1ac7d439429a425b0aeb5a7858a2
MD5 29a4f1ec4632edfd6094fbb5f214fa2d
BLAKE2b-256 8c2f8af90d45e585692eca1922c53e239c7aa97a904d9254df5b08f2f32520ac

See more details on using hashes here.

Supported by

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