* Write the CV in English.
* Find a better way to specify potential tables... in Matlab
* Recode the MP algorithm with the new way of doing messages (??)
Friday, June 24, 2005
Thursday, June 23, 2005
At work again
For tomorrow:
* debug the loopy belief implementation
* Implement and test Gibbs, Tree Gibbs
* finish documentation
* debug the loopy belief implementation
* Implement and test Gibbs, Tree Gibbs
* finish documentation
Thursday, May 05, 2005
Tree Gibbs working with FFBS
* Corrected last bugs and errors. It is correctly working right now, without any initialization problems.
* Read the Doucet and West statistical paper on non-linear state models. Interesting but in fact the framework seems to be significantly different from our framework. First they have densities reflecting exactly conditional probabilities and not potentials, etc... They use particle filters to compute a single trajectory as a single particle.
-> speack with Nando, see what next
* Read the Doucet and West statistical paper on non-linear state models. Interesting but in fact the framework seems to be significantly different from our framework. First they have densities reflecting exactly conditional probabilities and not potentials, etc... They use particle filters to compute a single trajectory as a single particle.
-> speack with Nando, see what next
Wednesday, May 04, 2005
Implementation challenges
* Tried to correct the initialization bug found yesterday. The limits of my current design and bad knowledge of C++ are becoming more evident each passing day.
* In particular, templates don't work very well with polymorphism. I think that in fact templates should be used much more rarely, in containers for example. If you know in advance which type you are gonna use for an object, you don't need tempaltes. I now think templates should rather be added later than sooner
* Learnt than a copy via a pointer that is pointing to a base class, is not possible, you have to write your own virtual Copy or Clone function
-> finish the implementation of the workarounds for the bugs discovered
* In particular, templates don't work very well with polymorphism. I think that in fact templates should be used much more rarely, in containers for example. If you know in advance which type you are gonna use for an object, you don't need tempaltes. I now think templates should rather be added later than sooner
* Learnt than a copy via a pointer that is pointing to a base class, is not possible, you have to write your own virtual Copy or Clone function
-> finish the implementation of the workarounds for the bugs discovered
Monday, May 02, 2005
Implementation work started again
* Read the PAMPAS paper in the reading group. It is interesting, and just loopy with some particle filters, essentially.
* Found some issues related to initialization, apparently, since Gibbs sampler produces different results if it is run after a Tree_Gibbs_Sampler. This is because, probably, the potentials on the nodes, instead of being Constant, are left equal to something...
* Implemented FFBS for Discrete cases and pairwise case. Has to be tested
* Verified that Peter explanation on FFBS has some errors.
-> correct the inialization issues
-> lots of code clean ups ?
* Found some issues related to initialization, apparently, since Gibbs sampler produces different results if it is run after a Tree_Gibbs_Sampler. This is because, probably, the potentials on the nodes, instead of being Constant, are left equal to something...
* Implemented FFBS for Discrete cases and pairwise case. Has to be tested
* Verified that Peter explanation on FFBS has some errors.
-> correct the inialization issues
-> lots of code clean ups ?
Wednesday, April 27, 2005
Forward Filtering Backward Sampling
* Talked with Nando. Learned about FFBS: this allows one to sample from the joint distribution, not only from the marginals, in chains and trees. This is really important and has to be understood and implemented.
-> learn in depth FFBS
-> learn in depth FFBS
Tuesday, April 26, 2005
Tree Gibbs sampler ready for review
* More tests on the Tree Gibbs Sampler
* Spent some time on Design Changes
-> Talk to Nando to verify the work
* Spent some time on Design Changes
-> Talk to Nando to verify the work
Saturday, April 23, 2005
Tree Gibbs Sampler and Gibbs Sampler agree!!
* A big milestone was reached today: after some more bugs were discovered and fixed, the Tree Gibbs Sampler seems to work (at least on a simple 10 nodes graph)! Hurray!
* I didn't have time to read some C++, but I spent time learning more about C++ debuggers (on Linux). DDD sucks, but seems to be the best; you have the option to stick the command tool to the top, which improves the situation (a bit). There are still many things that bother me. I tried the GPS debugger, which seems more modern but, at first glance, is completely worthless (you can't even break on a variable...)
* I developped some self made C++ practices:
* Try to avoid loops using integers, use iterators whenever you can, the type system is much more likely to catch errors!
* If you use more than one for loop in a function, give names to the looping variables, don't just use i, j, etc!
-> implement random graph generation for a single connected component
-> cosmetic changes...
-> speack with Nando and see what's up next
* I didn't have time to read some C++, but I spent time learning more about C++ debuggers (on Linux). DDD sucks, but seems to be the best; you have the option to stick the command tool to the top, which improves the situation (a bit). There are still many things that bother me. I tried the GPS debugger, which seems more modern but, at first glance, is completely worthless (you can't even break on a variable...)
* I developped some self made C++ practices:
* Try to avoid loops using integers, use iterators whenever you can, the type system is much more likely to catch errors!
* If you use more than one for loop in a function, give names to the looping variables, don't just use i, j, etc!
-> implement random graph generation for a single connected component
-> cosmetic changes...
-> speack with Nando and see what's up next
Friday, April 22, 2005
More debugging
* Cosmetic changes, implemented a lot of debugging functions (display_subgraph, etc...)
* Found and fixed the crucial bug affecting message passing (which was induced by yesterday's fix). MP and Simple Gibbs now agree for MRFs !
* Started referring to MRFs as "pairwise graphs" since an MRF isn't (apparently) restricted to pairwise potentials
* Still bugs in Tree Gibbs. I found a *major one*: we need to allow the Potential on the nodes to be SingleDiscrete and not Constant!! Or we should find a better way of implementing that...
* New ideas for a better interface in RandomVariable (less friends, implementation better encapsulated). We could use each sample as "prior knowledge". There is still the problem of translating that prior knowledge into probabilities (that would have to be a public function). Maybe I'll spend some time thinking about it.
-> correct the Tree Gibbs Sampler
-> implement a random graph creation algorithm, that creates connected graphs (use Boost algrithms)
-> if time allows, learn more about C++ (Parashift FAQ)
* Found and fixed the crucial bug affecting message passing (which was induced by yesterday's fix). MP and Simple Gibbs now agree for MRFs !
* Started referring to MRFs as "pairwise graphs" since an MRF isn't (apparently) restricted to pairwise potentials
* Still bugs in Tree Gibbs. I found a *major one*: we need to allow the Potential on the nodes to be SingleDiscrete and not Constant!! Or we should find a better way of implementing that...
* New ideas for a better interface in RandomVariable (less friends, implementation better encapsulated). We could use each sample as "prior knowledge". There is still the problem of translating that prior knowledge into probabilities (that would have to be a public function). Maybe I'll spend some time thinking about it.
-> correct the Tree Gibbs Sampler
-> implement a random graph creation algorithm, that creates connected graphs (use Boost algrithms)
-> if time allows, learn more about C++ (Parashift FAQ)
Thursday, April 21, 2005
Debugging
* Implemented Boost random system, it is nice. It wasn't too difficult
* Found a critical bug in the message passing algorithm for MRFs (the messages were sent when they shouldn't). Fixed, but we still probably have bugs. Gibbs and message passing still don't agree...
* Cosmetic changes, almost every template is manually instantiated now, which is good. No more #include "xxx.cc" directives
-> continue debugging...
* Found a critical bug in the message passing algorithm for MRFs (the messages were sent when they shouldn't). Fixed, but we still probably have bugs. Gibbs and message passing still don't agree...
* Cosmetic changes, almost every template is manually instantiated now, which is good. No more #include "xxx.cc" directives
-> continue debugging...
Wednesday, April 20, 2005
Tree Gibbs sampler finished
* finished the redesign of the RandomVariable class, it now has a lot of friends. Not ideal but I must concentrate on the implementation for now...
* as always, small cosmetic changes, template instantiations, etc...
* The executable is now 20 MB (!) in size! I don't understand how it can get that big...
* Everything is up and running, but I *feel* unknown bugs lurk in the code. We have big amounts of difference between Gibbs and tree Gibbs and we shouldn't... Some bug searching is now needed.
-> bug tracking, bug tracking, bug tracking
-> implement the Boost random number generator
* as always, small cosmetic changes, template instantiations, etc...
* The executable is now 20 MB (!) in size! I don't understand how it can get that big...
* Everything is up and running, but I *feel* unknown bugs lurk in the code. We have big amounts of difference between Gibbs and tree Gibbs and we shouldn't... Some bug searching is now needed.
-> bug tracking, bug tracking, bug tracking
-> implement the Boost random number generator
Monday, April 18, 2005
Tree Gibbs Sampler running
* Bugs in Boost CVS fixed, now we have all that is needed (I think)
* Learned about friends, partial specializations of classes; you can't just partial specialize the member functions, if you haven't partial specialized the class (though these functions can be taken out of the partially specialized class definition).
* Manually instantiated the Node class
* Cosmetic changes thoughout the code
* Started redesigning the RandomVariable class / interface
* I have the tree gibbs sampler running entirely. Now need some comparisons to squash the remaining bugs...
-> finish the redesign of the RV class
-> finish completely at last the Tree Gibbs sampler
* Learned about friends, partial specializations of classes; you can't just partial specialize the member functions, if you haven't partial specialized the class (though these functions can be taken out of the partially specialized class definition).
* Manually instantiated the Node class
* Cosmetic changes thoughout the code
* Started redesigning the RandomVariable class / interface
* I have the tree gibbs sampler running entirely. Now need some comparisons to squash the remaining bugs...
-> finish the redesign of the RV class
-> finish completely at last the Tree Gibbs sampler
Saturday, April 16, 2005
Bugs in Boost CVS
* Some bugs were sorted out, but there are still bugs in the bundled properties implementation for subgraphes. Request for fixes in boost-users
* Changes to the tree partition algorithm, related to memory control/ management. It now takes a subgraph as argument
* Cosmetic changes regarding *::vertex_bundled, etc... Boost CVS allowed the use of traits
* Continued to manually instantiate templates
-> finish the Tree Gibbs sampler (debug, etc...)
-> redesign the Random Variable implementation and interface
-> update to Boost CVS at UBC
* Changes to the tree partition algorithm, related to memory control/ management. It now takes a subgraph as argument
* Cosmetic changes regarding *::vertex_bundled, etc... Boost CVS allowed the use of traits
* Continued to manually instantiate templates
-> finish the Tree Gibbs sampler (debug, etc...)
-> redesign the Random Variable implementation and interface
-> update to Boost CVS at UBC
Friday, April 15, 2005
Update to Boost CVS
* Started the implementation of Tree Gibbs sampler, updated to Boost CVS because I needed bundled properties with subgraphs.
* Problems with type_traits in Boost CVS, that's a showstopper
* Thought about the mpossible reimplementation of large parts of code to better encapsulate; need to redesign interfaces...
-> sort out the Boost issue to complete implementation
* Problems with type_traits in Boost CVS, that's a showstopper
* Thought about the mpossible reimplementation of large parts of code to better encapsulate; need to redesign interfaces...
-> sort out the Boost issue to complete implementation
Thursday, April 14, 2005
Tree Gibbs sampler
* Worked on the design of the Gibbs tree sampler
* We will use subgraphs, it is problematic that bundled properties are not implemented for them
-> implement Tree Gibbs Sampling
* We will use subgraphs, it is problematic that bundled properties are not implemented for them
-> implement Tree Gibbs Sampling
Wednesday, April 13, 2005
Read of Chapter 22
* started reading chapter 22 of Jordans on variational methods. Seems very interesting
-> finish reading of Chapter 22
-> finish reading of Chapter 22
Tuesday, April 12, 2005
Tree partition finished
* Finished writing and debugging the input C++ code with streams
* Finished debugging the tree partition algorithm. It works fine with a 5*5 MRF, and with the test graph written for the draft paper back in Russia.
* Cosmetic code changes, creation of new files, etc...
-> write a Rao Blackwell function (or generalized Gibbs sampler) to work with trees, in the pairwise potential case
* Finished debugging the tree partition algorithm. It works fine with a 5*5 MRF, and with the test graph written for the draft paper back in Russia.
* Cosmetic code changes, creation of new files, etc...
-> write a Rao Blackwell function (or generalized Gibbs sampler) to work with trees, in the pairwise potential case
Saturday, April 09, 2005
Standard C++ Library: IO Streams
* spent the day essentially learning C++ streams. Many things to keep in mind:
* I/O and parsing in C++ is a tedious task!! Almost everything has to be done by hand. It can be very buggy code, hard to maintain...
* 2 basics levels of functionality: the >> operators are for very simple tasks and parsing, for common situations. But should you need to write complex or even non trivial I/O, you need to learn about member functions (get, getline, etc... and a ton of other things)
* It may thus be worth it to learn the Boost parsing library or the Boost regexp library
* Only practice can help remember the many issues associated with I/O streams, I think.
* the C++ parashift FAQ is really well documented, bookmarked it.
* Learnt about friends, inline functions should be declared in the implementation
* Headers are not meant to disallow access to your classes, it is first a tools for the programmer, not a security measure
* downloaded a C++ Standard Library book
* wrote a test function to read graph from a file using a simple language; needs to be finished and debugged
-> finish to debug the io code
-> write a random potential and / or random variable generator
-> previous goals of yesterday
* I/O and parsing in C++ is a tedious task!! Almost everything has to be done by hand. It can be very buggy code, hard to maintain...
* 2 basics levels of functionality: the >> operators are for very simple tasks and parsing, for common situations. But should you need to write complex or even non trivial I/O, you need to learn about member functions (get, getline, etc... and a ton of other things)
* It may thus be worth it to learn the Boost parsing library or the Boost regexp library
* Only practice can help remember the many issues associated with I/O streams, I think.
* the C++ parashift FAQ is really well documented, bookmarked it.
* Learnt about friends, inline functions should be declared in the implementation
* Headers are not meant to disallow access to your classes, it is first a tools for the programmer, not a security measure
* downloaded a C++ Standard Library book
* wrote a test function to read graph from a file using a simple language; needs to be finished and debugged
-> finish to debug the io code
-> write a random potential and / or random variable generator
-> previous goals of yesterday
Friday, April 08, 2005
Template Specialization
* tried explicit template instantiation. Seems to work fine, we should maybe do that throughout the code
* Learned a lot about C++. A templated function can't have partial specialization, nor can't it have default template arguments. A workaround is just to do partial specialization on a class that can be used as a function
* finished debugging tree partition. It is now able to produce the correct result in a simple test case
* BGL: be very careful about add_edge or remove_edge, it invalidates iterators
* Made make_random_graph truly generic
* cleaned up in the code (minor, mainly converting i++ to ++i)
-> continue to test tree partition on more complex cases, clean up code and comments
-> continue to work on genericity
-> reorganize current files, continue clean-up, maybe try to do explicit instantation everywhere
* Learned a lot about C++. A templated function can't have partial specialization, nor can't it have default template arguments. A workaround is just to do partial specialization on a class that can be used as a function
* finished debugging tree partition. It is now able to produce the correct result in a simple test case
* BGL: be very careful about add_edge or remove_edge, it invalidates iterators
* Made make_random_graph truly generic
* cleaned up in the code (minor, mainly converting i++ to ++i)
-> continue to test tree partition on more complex cases, clean up code and comments
-> continue to work on genericity
-> reorganize current files, continue clean-up, maybe try to do explicit instantation everywhere
Wednesday, April 06, 2005
Template compilation, test of Tree Partitioning
* lots of things learned about template compilation. GCC is not yet optimal for this; one way out of the problem would be to implicitely instantiate the templates...
* C++ : learned about the for loops (seems funny to write that!!), and of the difference between ++i and i++. ++i is preferred.
* Tested and fixed lots of bugs about the tree partitioning. Much work still needs to be done
* Made make_random_graph generic
-> finish testing the tree partition, and make some generic changes
* C++ : learned about the for loops (seems funny to write that!!), and of the difference between ++i and i++. ++i is preferred.
* Tested and fixed lots of bugs about the tree partitioning. Much work still needs to be done
* Made make_random_graph generic
-> finish testing the tree partition, and make some generic changes
Subscribe to:
Posts (Atom)