Aug 1, 2011

All is well if the 'means' as well as the 'end' is well.

All is well if it ends well, so goes the saying. However, to me, end alone is not much important, but also the means by which we achieve the end.

So, when the DARP coordinator announced about the project competition in the final week (in which each group will have to work on a given method and submit their results, and the one whose result matches with true value will be announced as winner), me and Vishal (who shares same view in the 'end' point) decided to stop concentrating on the project, and use the time available to understand about the method.

And that's what we did in the last one week! Jay, a passive member in our group, had already coded the Lorenz '63 model in Matlab for some other purpose. We took the code from him as a kick start, added the Sequential Monte Carlo technique part for the ensembles to begin with.

We then modified the code to include Importance Sampling, and finally incorporated Sequential Monte Carlo with Importance Sampling, and Resampling. In order to test our understanding, we forwarded the code to Elaine, our team lead, and to other group members, asking them to go through it and execute.

Jyoti, an active member, who is good in Fortran coding, gave us a very encouraging comment to the code saying she could follow it easily! But it struck us hard the next day when she came to us and said "my laptop crashed after running your code!"

Later, we came to know from our team lead that while the logic part of our code is correct, the code is not optimized for memory, which is the reason why Jyoti's laptop crashed. I still believe had she installed Linux in her laptop and executed the code in it, her laptop would not have crashed.

Soon we learnt that in Matlab we should not code in Fortran way! We should avoid if statements and for loops as much as possible, and should initialize the parameters to avoid dynamic size allotment, especially when the variable is in a loop.

By that time, Jaman and Jason, along with other group members assistance, had already modified Elaine's code (which she had written for some other model), to work for the Lorenz '63 model. Since Vish and I are convinced that our understanding of particle filtering is correct, we tried to incorporate our ideas in their code to speed up the computations in the limited time available to us.

On the final day, we did some experiments (which we were supposed to do at least a day before!), got some interesting plots, copy pasted in no-order and made the following presentation.

While Vish and I were rejoicing about the means by which our project came to an end (understanding how particle filter works), the coordinator announced the final results! We were on cloud nine when we came to know that the means to an end had brought us to a successful end as well. We congratulated each of our group members, who were later rewarded with a book, "Chaos: A Very Short Introduction" written by Leonard (Lenny) Smith. Lenny is one of the speaker who lectured on non-linear models earlier during the lecture part of the program.
Group 1: Particle Filtering