Python developers to access maths and stats algorithms more quickly and seamlessly with re-engineered NAG Library

August 23 2018 – JupyterCon 2018, New York, the Numerical Algorithms Group (NAG), experts in algorithms, software and HPC have announced the re-engineering of its flagship NAG Library for Python. The latest NAG Library for Python release brings new algorithmic content in the area of mathematical optimization. All NAG Library content works seamlessly with NumPy data types.

The re-engineered NAG Library gives developers of Python many improvements to usability enabling quicker application development including, self-contained routine documentation, thread-safety, curated examples demonstrating important algorithmics and Python-related functionality, and support for native Python callbacks and C language routine equivalents giving a unified route from prototyping in Python to deploying as compiled code.

Alongside the NAG Library for Python significant usability improvements are two new NAG optimization algorithms: Derivative-free Optimization for Data Fitting and Interior Point Method for Large Scale Linear Programming Problems further expanding the number of world-class maths and stats algorithms available in the NAG Library.

The Derivative-free Optimization for Data Fitting solver was developed in collaboration with the Centre for Doctoral Training in Industrially Focused Mathematical Modelling (InFoMM) at the University of Oxford. Calibrating the parameters of complex numerical models to fit real world observations is one of the most common problems found in many applications such as finance, multi-physics simulations and engineering. It is not easy, or even possible to evaluate derivatives of functions which appear in the optimization model and thus many well-established approaches in mathematical optimization might not be satisfactory. Moving to a derivative-free regime presents novel approaches for approximating the solution without computing or estimating derivatives. NAG added its first derivative-free solver to the NAG Library approximately five years ago. Since then this field has attracted significant academic attention, resulting in numerous advances. The new Derivative-free Optimization Solver can effectively exploit the structure of calibration problems and is thought to be the first such commercial solver publicly available in the world.

The second optimization routine is an Interior Point Method for Large Scale Linear Programming Problems built upon a very efficient sparse linear algebra package and implements two variants of interior point methods: The Primal-Dual and Self-Dual methods. The Primal-Dual usually offers the fastest convergence and is the solver of choice. Both implementations should present significant speed-ups for large scale problems over the current LP/QP solvers in the Library. Linear programming is popular in finance and logistics, particularly optimizing planning, production and transportation processes, but also lends itself to many other fields and industries.

A NAG team will be on-hand at JupyterCon – the official conference of Jupyter; an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text – and will be demonstrating how NAG Library algorithms can bring multiple benefits to its users.

The 64-bit NAG Library for Python is available for Linux, Apple Mac OS and Microsoft Windows and is compatible with Python 2.7, 3.5, and 3.6.

Full product trials are available for the NAG Library for Python. For more information visit www.nag.co.uk/nag-library-python.