Hi,
I'm interested in using Sympy to automatically derive updates for a
general specification of some machine learning problems (specifically
variational EM algorithms).
Most likelihood functions I'm concerned with follow some variation of
the form:
L = \sum_{i=1}^N \frac{(\mu - tau_{i})^2} { 2 \sigma^2}
Where there is one set of model parameters for each _variable_ (\mu
and \sigma), and one set of variational parameters for each
_data_instance_ (\tau_{i}).
I want to do the following:
mu_update = solve(L.diff('mu'), 'mu')
tau_i_update = solve(L.diff('tau_i'), 'tau_i')
I'd like to express L in sympy such that these calls will give me
proper updates in a compact form (there will often be tens of
thousands of data instances, so I don't ever want summations expanded
in the mu_update, for example). I'd also like to be able to
differentiate with respect to some arbitrary tau, which will discard
all of the other irrelevant terms in the summation.
Is this possible to do with Sympy? If I were interested in working on
something like this, how hard would it be for a sympy newbie (but
competent programmer) to implement? Any tips on where to start?
Thanks,
Danny
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---