Friday, January 15, 2010

Research

So I finally finished converting my matlab code to use LBFGS, and then finally finished converting my matlab code to C++, using boost::ublas. The results, are of course, encouraging, I'm seeing much faster times, on much larger datasets, so far a 10,000 example set takes about four minutes to compute a L^0 regularized solution. I haven't optimized this set yet, only used g++ optimization flags. (Thanks Chen for your class on optimizers.) I'll spend today optimizing with cachegrind and poring over my code, before getting to the real optimization issue, which is performing the optimization on different data structures.

I know there are faster linear algebras out there than ublas, and I may end up converting from this C++ code to use them (atlas, for example) but I took a look at the syntaxes and find that ublas is much easier to work with from a matlab->C++ conversion perspective. Of course, I may do this again just to gain some experience.

When I'm done with this, I really want to try building a matlab->C interpreter, just so I don't have to waste so much time doing this messy first step by hand. I've never built an interpreter before, but I can't think of something that so many people including myself will find as useful. I found a matlab yacc grammar out there, so some part of it is done. I suspect this is the easiest part.

No comments: