I have the expression Sum from 1 to K of log(sigmoid(-u_k^Tv_c)) . Sorry I don't have enough reputation on StackOverflow to post an image.
Here u and v are both matrices. I'm trying to implement this using numpy and getting totally stuck.
What I have:
np.sum(log(sigmoid(-np.dot(u.T,v))))
Which I know isn't even close to what I want because I haven't been able to restrict the sum to the range 1 through k at all yet. Sigmoid is a function implemented elsewhere. The dimensions of u and v should work out just fine.