Giter VIP home page Giter VIP logo

cl-ad's Introduction

CL-AD

Automatic (algorithmic) differentiation library for Common Lisp. It is based on Scheme library but is implemented in a more generic way using CLOS.

What is "automatic (algorithmic) differentiation (AD)"?

AD rerers to the method of calculating numerical derivatives analytically, but not symbolically. A general idea is to exploit the chain rule. For this the whole arithmetic of the language is replaced with slightly more generic arithmetic operations: instead of operating on numbers only, these operations can accept dual numbers or tapes and produce the derivative of the operation as well as the main result.

In essence, dual numbers are the extension of numbers with perturbations, their "derivatives". Consider function f(x). If we know it's derivative df(x), then given a dual number [z dz], the result of application of f(x) to it is a dual number [f(z) df(z)*dz]. This result can become an input to the next function g(x), producing [g(f(z)) dg(z)*df(z)*dz]. And so on. To begin the process, all we need is to set dz=1. This is called forward derivative.

TODO: reverse derivative.

Current status

Forward derivatives - complete, beta-state Reverse derivatives - TODO

Future

  • Extend it to symbolic data
  • Implement full Jacobian calculation

Examples

License

Copyright © 2016 Alexey Cherkaev (mobius-eng)

Distributed under Lesser GNU Public License 3 or (at your option) any later version.

cl-ad's People

Contributors

mobius-eng avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

cl-ad's Issues

Improve README

Add examples of uses.

Add explanation of reverse derivatives

Add more tests to cover more cases

Many functions are not covered in tests: asin, acos, atan, log with non-default base, expt when the variable appears in both base and power, and logical functions.

Add documentation

Most functions have doc-strings, but a proper documentation will help.

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.