Publication: Efficient computation of derivatives for solving optimization problems in R and Python using SWIG-generated interfaces to ADOL-C
Introduction
Applications
Tools
Research Groups
Workshops
Publications
   List Publications
   Advanced Search
   Info
   Add Publications
My Account
About
Impress

Efficient computation of derivatives for solving optimization problems in R and Python using SWIG-generated interfaces to ADOL-C

- Article in a journal -
 

Author(s)
Kshitij Kulshreshtha , Sri Hari Krishna Narayanan , Julie Bessac , Kaitlyn MacIntyre

Published in
Special issue of Optimization Methods & Software: Advances in Algorithmic Differentiation Optimization Methods & Software

Editor(s)
Bruce Christianson, Shaun A. Forth, Andreas Griewank

Year
2018

Publisher
Taylor & Francis

Abstract
Scripting languages are gaining acceptance because of their ease of use and value for rapid prototyping in many fields, including machine learning and statistics. In the context of algorithmic differentiation, however, the main development effort continues to be concentrated on traditional compiled languages such as Fortran and C/C++, whether source transformation tools or operator overloading tools. There is therefore a need for ad tools for computing derivatives efficiently within scripting languages. ADOL-C is an operator overloading-based C++ library that provides accurate first- and higher order derivatives for applications in C++. SWIG is a preprocessor that uses the C/C++ header files to wrap the API of a library to be callable from scripting languages such as R and Python and several other high-level programming languages. Although every language has its caveats, the overall process of making the C/C++ API available via SWIG is the same for all scripting languages. After an initial effort required per language, because SWIG is an automated interface generator based on the library's actual header files, only minimal effort is required to maintain the scripting interface in sync with upstream developments in the original C/C++ library. In addition to achieving our original goal of creating an interface for R, we were able to generate an interface for Python that proved an order of magnitude faster than the previously implemented interface. This paper gives an overview of the interface generation process, the challenges we encountered with both scripting languages and some numerical results to demonstrate both usefulness and efficiency.

Cross-References
Christianson2018Sio

BibTeX
@ARTICLE{
         Kulshreshtha2018Eco,
       crossref = "Christianson2018Sio",
       author = "Kshitij Kulshreshtha and Narayanan, Sri Hari Krishna and Julie Bessac and Kaitlyn
         MacIntyre",
       title = "Efficient computation of derivatives for solving optimization problems in {R} and
         {P}ython using {SWIG}-generated interfaces to {ADOL-C}",
       journal = "Optimization Methods \& Software",
       volume = "33",
       number = "4--6",
       pages = "1173--1191",
       year = "2018",
       publisher = "Taylor \& Francis",
       doi = "10.1080/10556788.2018.1425861",
       url = "https://doi.org/10.1080/10556788.2018.1425861",
       eprint = "https://doi.org/10.1080/10556788.2018.1425861",
       abstract = "Scripting languages are gaining acceptance because of their ease of use and value
         for rapid prototyping in many fields, including machine learning and statistics. In the context of
         algorithmic differentiation, however, the main development effort continues to be concentrated on
         traditional compiled languages such as Fortran and C/C++, whether source transformation tools or
         operator overloading tools. There is therefore a need for AD tools for computing derivatives
         efficiently within scripting languages. ADOL-C is an operator overloading-based C++ library that
         provides accurate first- and higher order derivatives for applications in C++. SWIG is a
         preprocessor that uses the C/C++ header files to wrap the API of a library to be callable from
         scripting languages such as R and Python and several other high-level programming languages.
         Although every language has its caveats, the overall process of making the C/C++ API available via
         SWIG is the same for all scripting languages. After an initial effort required per language, because
         SWIG is an automated interface generator based on the library's actual header files, only
         minimal effort is required to maintain the scripting interface in sync with upstream developments in
         the original C/C++ library. In addition to achieving our original goal of creating an interface for
         R, we were able to generate an interface for Python that proved an order of magnitude faster than
         the previously implemented interface. This paper gives an overview of the interface generation
         process, the challenges we encountered with both scripting languages and some numerical results to
         demonstrate both usefulness and efficiency.",
       booktitle = "Special issue of Optimization Methods \& Software: Advances in
         Algorithmic Differentiation",
       editor = "Bruce Christianson and Shaun A. Forth and Andreas Griewank"
}


back
  

Contact:
autodiff.org
Username:
Password:
(lost password)