Thursday 31 July 2014

Halfway into GSOC

Edit: I just realized today that I had not publised this post. How dumb!

Well, the mid-way deadline into GSOC just went by. It has been a fun journey till now. So first, let me begin with the crucial updates.

So as I had mentioned in my last post, I had begun working on the message passing framework. Well, the entire thing was looking very simple initially but coding the entire thing was not so simple. (I mean, it is a very nice thing to visualize the message passing algorithm working, but coding it is a separate beast altogether). Anyway, I did code it up with pleasure and wrote the code for message passing. After that I finished the basic version of message passing which can at least find the normalization constant. However, like every other code in this world, it wasn't running as expected in the first go.  Well, no big deal! Like every other bug. However, after a lot of effort (and a lot of wasted pages in working out the things on paper) I realized that the bug was in one of the pgmpy library functions (the function which multiplies the two factors together).

So the next obvious step would be to solve the bug. However, this part of the code was not commented really well and hence I just thought that it will be best to ask Ankur and Shashank to solve this issue. So I have posted this issue on the group and am hoping for a quick solution. What this means is that I really can't proceed much farther without a product function (because that is a very crucial function in the upcoming things).

In any case, I have also written up the function to find the marginal probabilities. (However, again this is untested. How do I test it, because, this is again heavily dependent on the product function). I have run it with some test cases and this code it running at least . ;)

So now, the next task will be quickly test the above functions and then be done with the MAP functions. (There are some issues with this though. The factor will require a special representation because with each combination of value of variables, we will also need to store the value of the eliminated variable (the value which these variables took for the purpose of maximization)).

Till 13th July, bye!