Category Archives: Programming

Learning Mixture of Markov Models with EM

Here I present my Matlab implementation for learning Markov mixtures with EM algorithm. David Barber’s book explains the model and the EM derivation very nicely, and also provides a Matlab code package for it. Both the book and codes are open, you’re recommended to have look at them. However, Barber’s code is written for readability… Read More »

C++, give us the length of our arrays!

I’ve been the teaching assistant of the C++ course for a while, but I haven’t realized that C++ keeps the lengths of the dynamically allocated objects at the run time until this week. The array deletion operator delete[] which calls the destructor of each array element has to know the number of elements in the… Read More »