odow / MathOptSymbolicAD.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Explore repeated terms in a function

odow opened this issue · comments

A lot of problems have the form: sum_i f(x_i), for example machine learning problems where the sum is over observations in a dataset. We can improve the performance of this if we identify the common f term.

This structure appears in the inverse ising problems [private link]:
https://github.com/lanl-ansi/nlp-jump-examples/blob/47d6ccb26c6041390b0662b1d8c1041f28d787ed/inverse_ising/inverse_ising-logrise.jl#L37-L40