Coder Social home page Coder Social logo

bounded-lsq's Introduction

Bounded Nonlinear Least-Squares Optimization

This repository contains algorithms I'm preparing for scipy as part of my GSoC 2015 work. In order to use: clone this repository and add the path to the folder to PYTHONPATH. Tested in Python 3.4 and 2.7 with numpy 1.9.2 and scipy 0.15.1.


The algorithms is contained in package bounded_lsq.

  1. leastsqbound.py is a wrapper over scipy.otpimize.leastsq which does bounded-to-unbounded variables transformation. It is the exact copy from here, master branch, taken on 27 June 2015, commit 937c67500cf9340c31d5cfbbb274894e3b59bd89. This is the fixed version and now it works well.
  2. dogbox.py implements a dogleg trust-region algorithm applied to a rectangular trust region. You can read the description in my blog.
  3. trf.py implements a special Trust Region Reflective algorithm which combines several ideas. See the description in my blog.

Run benchmarks from benchmarks/run_benchmarks.py. The default usage

python run_benchmarks.py

runs all benchmarks with default tolerance parameters, analytical Jacobian and prints to stdout.

The following example command run only bounded problems with custom tolerance settings using 2-point numerical Jacobian approximation and prints the result into a file:

python run_benchmarks.py report.txt -b -ftol 1e-12 -xtol 1e-12 -gtol 1e-8 -jac 2-point 

Run python run_benchmarks.py --help to see full parameters signature.

For more information about this benchmarks read my post. Your results can be somewhat different to ones reported in the blog, because I keep adjusting algorithms.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.