Thursday, August 11, 2005

Started reorganizing modules at James' suggestion. For example, all of the different types of nodes (BayesNode, DirectedNode, etc) are located within one large module Node.py. I am not quite finished doing this, and then the next step is to reorganize all of the files themselves into a different directory structure.

On the code front, I finished a very rudimentary version of EM. My current version computes the distribution of the missing data values and then fills in the missing values by sampling from this distribution. I find this solution to be algorithmically and conceptually simple, however it is not the best way to implement EM. Doing this means that the likelihood of "all" the evidence is never computed, instead the likelihood of each evidence case is computed separately. It will work for now...

I have moved onto DBNs. I have found Kevin Murphy's Thesis to be priceless so far. It looks like I am going to be able to salvage much of my JunctionTreeEngine code from the static case. I think I can make it work for the DBN (actually specifically on HMMs for now) without too much adaptation, therefore I decided to make it a child of the original JunctionTreeEngine class. This may prove a bad idea because it doesn't exactly make sense that a DBN case would be a child of a static case. But I am going to leave it for now and when I come back through the code I might separate them completely, or create a new abstract parent class and have them both inherit from that (after relocating the code that they would want to share into the parent class).

0 Comments:

Post a Comment

<< Home