Giter VIP home page Giter VIP logo

ad-handbook's Introduction

ad-handbook

This is the source repository for the Automatic Differentiation Handbook.

Pre-built pdf

Here's a pre-built pdf of a recent (but perhaps not the latest) DRAFT:

I don't have a pre-built version of the HTML yet, but I'll try to figure out how to push that to my GitHub pages repo automatically one of these days.

Contributing

Please create

  • issues for feature requests or reporting bugs/typos/brainos
  • pull requests for contributions

If you contribute and want to be listed by name rather than GitHub handle, please include that in the PR. Also, if you'd rather not be listed, say that, too!

The C++ reference implementation

Licensing

The code is licensed under BSD-3 and the text under CC-BY-ND-NC 4.0. All contributions are made in accorance with this license under the terms of use for GitHub.

Building the book

Prerequisites

The following system package must be installed:

  • pandoc
  • pandoc-citeproc

See the instructions for installing pandoc.

The following R packages must be installed in order to build the book:

  • bookdown
  • tufte
  • reshape
  • ggplot2
  • gridExtra
  • formatR

They can be installed using, e.g.,

> install.pacakges('tufte')

Build steps

To build the HTML version of the book from R using the bookdown package,

> library(bookdown)
> render_book('index.Rmd')

The first page of the book can then be found in the file _book/index.html.

A web connection is required to render the mathematics in the web version because it uses MathJax.

To build the PDF version of the book using a shell script,

> ./build-pdf.sh

and to build the HTML version,

> ./build-html.sh

ad-handbook's People

Contributors

adamhaber avatar bob-carpenter avatar jtimonen avatar mortonjt avatar syclik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ad-handbook's Issues

Small issue in the intro

Saw your post on discourse and was checking this out. I noticed in the index.Rmd you write:

Automatic differentiation is a general technique for lifting a function computing values to one that also computes derivatives.

Two small issues that impact the understanding. 1) Could you explain or use different terminology for what "lifting" means (I found some references to lifting a function below) and 2) I see the dependent clause after 'function' was used to loosely define this, maybe just expand into a new sentence such as

Automatic differentiation is a general technique for lifting a function from computing values to also computing derivatives.

Contribution: section on implicit functions

Restating my post on https://discourse.mc-stan.org/t/help-write-an-autodiff-handbook/12640/13.

I propose grouping the chapters on ODEs, algebraic equations, and integrals, into one section on implicit functions. This is in part because for all these methods, we can apply the adjoint method to construct differentiation algorithms.

The content would be as follows:

Automatic differentiation for implicit functions

  1. Algebraic equations: implicit function theorem, adjoint method, practical considerations
  2. Optimization problems: extending results from the algebraic equations, equality constraint, inequality constraints, conditions for existence of derivatives and diagnostics
  3. Ordinary differential equations: full Jacobian, adjoint method, tricks for users
  4. Action of matrix exponential: adjoint method based on ODE case
  5. Differential algebraic equations: adjoint method
  6. Discrete sequences: adjoint method

We've already written a lot of this down, it's just matter of putting it together.

Prereqs for building the book

I needed to install these packages in R:

  1. tufte
  2. reshape

I'm sure I have a bunch already installed.

Where's a good place to put this info? I was originally going to modify the README.md with a ## Before building the book subsection, but then thought it could be useful to have an install.R script or something else programmatic.

Formatting for derivatives, adjoints, tangents etc. and some more matrix results?

Looking over the collection of known derivatives etc. should that section have a header and a little, "Hey these are some common cases if you want to use these."?

It might also be nice to format them as a list

[Operation]:

  • Derivative:
  • Adjoint:
  • Tangent:

There's also a few matrix algebra ops I can write here if you want them.

Additional R build dependencies, possible missing file

Working on building the book. So far I've needed these R packages in addition to the ones in the README:

  • ggplot2
  • gridExtra
  • rstan
  • formatR

Now I'm getting this error:
! LaTeX Error: File 'tufte-book.cls' not found.
Maybe an uncommitted file?

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.