Hi,

I’m looking for a symbolic manipulations library to do different sorts of analysis on a model. I’ve tried python SymPy but couldn’t get it to work; following a recent tweet by @cscherrer, I was wondering whether I can use Julia’s SymPy/SymEngine for this. In short, the expression I’m interested in is an exponential distribution of the form:

P(x,y|W)=\frac{1}{Z}\exp\left(-xWy\right)

such that x,y\in\{0,1\}^N are boolean vectors of size N, W is an NxN matrix and Z is a normalising constant (or partition function):

Z=\sum_{x,y}\exp\left(-xWy\right)

I’m interested in various quantities of this expression, such as \frac{dP}{dw_{ij}}, KL\left( P(x,y|W) ; P(x,y|W')\right), and others, as well as approximations for the w_{ij}\ll1 regime (which helps with the exponent). Is this reasonable/doable in Julia?

Disclaimer - I have absolutely no Julia experience; I’ve been wanting to try it for a long time, and I’m hoping this will be my excuse.