21.01.2015 Views

Algorithmic Differentiation in Python with Application Examples

Algorithmic Differentiation in Python with Application Examples

Algorithmic Differentiation in Python with Application Examples

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Computational Model and the Evaluation Trace<br />

All computer programs are a sequence of elementary functions<br />

φ l ∈ {+, −, ∗, /, s<strong>in</strong>, exp, . . . }<br />

Symbolic dependency is resolved at each elementary function:<br />

pushforward of numerical values v j≺l<br />

Example: Evaluate Function f (3, 7):<br />

f : R 2 → R<br />

x ↦→ y = f (x) = s<strong>in</strong>(x 1 +cos(x 2 )∗x 1 )<br />

Computational Graph:<br />

Computational Trace:<br />

1 Id<br />

<strong>in</strong>dependent v −1 = x 1 = 3<br />

<strong>in</strong>dependent v 0 = x 2 = 7<br />

v 1 = φ 1 (v 0 ) = cos(v 0 )<br />

2 cos<br />

v 2 = φ 2 (v 1 , v −1 ) = v 1 v −1<br />

v 3 = φ 3 (v −1 , v 2 ) = v −1 + v 2<br />

3 __mul__<br />

v 4 = φ 4 (v 3 ) = s<strong>in</strong>(v 3 )<br />

4 __add__<br />

5 s<strong>in</strong><br />

0 Id<br />

Sebastian F. Walter, Humboldt-Universität zu Berl<strong>in</strong> <strong>Algorithmic</strong> () <strong>Differentiation</strong> <strong>in</strong> <strong>Python</strong> <strong>with</strong> <strong>Application</strong> <strong>Examples</strong> Wednesday, 10.07.2010 10 / 27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!