News for hackers. Stuff that matters.
Re:Automatic Differentiation in OCaml by tqwhekjapflskdf on Tuesday September 20, 2022 @12:03AM (#32907521)
I don't understand what the fuzz is about all this forward-mode AD stuff. This is the easy part. Hell, you can basically use complex numbers to do all this for you for free (use Cauchy-rule + FD) without changing the rest of your code.
Re:Automatic Differentiation in OCaml by amelius on Tuesday September 20, 2022 @07:58AM (#32910505)
Meanwhile, there's no good GUI library (binding) for OCaml, which would make the language much more usable for many.
Re:Automatic Differentiation in OCaml by lapinot on Tuesday September 20, 2022 @08:03AM (#32910548)
Just write pure functions, i've got no use to interacting with the world :P
Re:Automatic Differentiation in OCaml by vore on Tuesday September 20, 2022 @02:07AM (#32908221)
Could you elaborate on this?
Re:Automatic Differentiation in OCaml by tgymnich on Tuesday September 20, 2022 @03:58AM (#32908933)
They might be talking about complex step diff: https://www.hedonisticlearning.com/posts/complex-step-differ...

tldr: f‘(x0)≈Im(f(x0+hi))/h

Re:Automatic Differentiation in OCaml by beagle3 on Tuesday September 20, 2022 @11:48AM (#32913380)
If that is what they meant, that's not a good idea.

Choice of h dictates precision (less bias than doing it purely in the real domain, but still .. a nontrivial choice). And also requires your functions to be analytical - which many aren't.

Whereas autodiff is precise .

Re:Automatic Differentiation in OCaml by sfpotter on Tuesday September 20, 2022 @09:57PM (#32920076)
Re:Automatic Differentiation in OCaml by yellowcake0 on Wednesday September 21, 2022 @04:38AM (#32922258)
I know the contribution of the higher order imaginary terms are negligible in the result, but dual numbers are the more appropriate choice in this instance correct? since the higher order terms will vanish.