Friday, October 07, 2005

I thought I was back the last time I posted in early September. But as luck would have it, my honors thesis just wouldn't come out like i was hoping, and i ended up stuck knee deep in some data trying to get out any indication that we actually recorded the brain signals we think we recorded.

To the point... I have finally been able to spend some time back on good ol pbnt and I pretty much have an unrolled jtree algorithm done. The only thing left to do is handle how the dbn access the evidence properly. I will regrettably be gone for the weekend though, so there will not be any forward motion on this until mid next week.

As always I will keep all interested posted.

Friday, September 09, 2005

After a rather long hiatus, I am back. I spent the last week or so getting ready for some research related deadlines and finishing a lot of administrative stuff associate with releasing 0.1 of PBNT. It is officially out now, so please go and download it, test it, use it, let me know what you think of it.

I am finally back to moving forward with adding support for DBNs. I am starting with a Jtree unrolled inference algorithm. I am a little hung up on how to differentiate between one time slice and another in terms of their internal representation.

As always I will keep you all posted.

Saturday, August 27, 2005

I have been continuing to clean the code more and more. I added a number of operators to the potential class. So now many of the operations in junction tree resemble more closely their actual equations. For example in absorb within pass message, it now is only a couple of lines. One line to divide the old sepset from the new and another line to multiply the clique by the sepset. This has greatly cleaned up my code.

I also have fully integrated the idea of having nodes be sets not lists within graphs and within neighbor, parent, and child fields. To match this, the evidence of an inference engine had to become a dictionary mapping nodes to their values. I also created a new generate index method for potentials that takes a list of nodes instead of a list of axes, and it then converts the node list into a corresponding axis list given the order of the nodes within the potential.

I have a little more to do to make this consistent throughout the code. The enumeration engine is working, but i have not completely fixed the jtree engine.

Monday, August 22, 2005

With the code cleanup finished I have started working on implementing DBNs. I have already gotten great comments and feedback from Duncan and James. Duncan had a suggestion that I have tied my graph classes to my tables too closely. I really think he has hit it on the nose. I am currently studying his table classes in order to see if I can glean some clever ways given his code as to how to adapt my implementation of tables in order to take this idea into account.

Basically, I am going to look to change all node and graph classes to maintain only sets of parents, neighbors, children, etc. The tables will maintain an ordered list of the nodes (essentially I will keep all of them in topological order). In my case, there will be one difference. I am planning on implementing many of the things that Duncan has, but I want to incorporate these changes into my Distributions module. It seems to me that to define a table along a set of variables inherently makes it more of a distribution than a plain table (though in Duncan's case he uses tables for other things so I suppose it makes sense for him).

On the DBN front, I am starting first with the JTree inference algorithm. Specifically, I am planning on using Kevin Murphy's Interface algorithm as presented in his thesis. After that I am going to move onto the jtree construction, which should be rather simple. According to Kevin Murphy's thesis, the structure of the jtree can be the exact same as in the static case, except that one needs to guarantee that the backward and forward interfaces are each in a clique. To do this one has only to make sure that all nodes within these interfaces are connected in moral graph. After that the goal will be to create the DBN structure itself. I have been thinking about what this last structure might look like and so far I have not come up with anything I really like. This is why I am putting it off until the end. I think that in the creation of the rest of the code, I will be using the DBN class a decent amount, which I am hoping gives me some clues as to the most advantageous design. As of now, I am imagining something along the lines of a list of nodes that specify what a single slice looks like (this class is going to have the requirement, for now, that all slices have to have the same structure) and then another list of the backward interface nodes and another for the forward. But what might work better, would be to really have the DBN class be just a list of nodes as in the static case. Then use a new type of temporal node which maintains a list of intra slice parents / children and a different set of lists of inter slice parents / children.

As I implement this, I will also try to be incorporating the changes to my Distributions module, so that that does not have to wait for the DBNs to be done.

Friday, August 19, 2005

The code cleanup is finally done, almost a week later than i thought it would be. I am actually very happy with the cleanup. The problem however is i have introduced a bug in the way i handle indexing the arrays. This is unbelievably frustrating. I thought I had finally figured out the slices, but it just seems that while they index the correct locations, and therefore work for a set statement, when doing a select statement, they return the desired arguments, but the array is not shaped correctly. A return value that should be 3 long is instead (1,3,1), and so when I use that value in a multiplication or something akin to that, I get all kinds of weird answers.

I think my plan is going to be to pass in the indices and axes as arguments to the [] notation, and then handle all of the slicing behind the scenes, that way i can fully abstract the method of slicing and the underlying array implementation from the rest of my code. This single problem has probably cost me more than 2 weeks worth of work. Ahhhhh!

Hope everyone has a great weekend.

Tuesday, August 16, 2005

The code cleanup is now almost done. I finished the module. So officially I have cleaned the code, but since I started with InferenceEngine, and I have now made changes to method names in the Graph and Node modules, I have to go back through the InferenceEngine. This is going to wait for tomorrow, but it shouldn't take long.

Monday, August 15, 2005

The code cleanup is going well. I have to go through the graph code and the distribution code, and then i should be done. So hopefully this will all happen tonight, but it could be tomorrow before I am done.

So far the code cleanup has really helped clarify things in my head. The distribution code is going to change the most, i am going to properly divide up the plain distributions from the conditional distributions and the potentials.