3 ene 2009

Liblinear is amazingly fast!

I decided to give up using LibSVM for the linear case because it was not optimized for that. Then, I had a look at liblinear, developed on the same team than LivSVM. Liblinear is recommended for document classification because it removes lots of unuseful operations for the linear case. It has also a (very recent) port to Java, which is located here.

Now, working with 50 categories and 0.5GB of data takes only less than 10 seconds on a Core 2 Duo 2GHz laptop. Those timings are impressive! The interface for this library is very similar to the LibSVM one, so it is very easy to migrate from one library to other. Of course, if you made a good design, all you have to do is to update/change your corresponding facade class.

BTW: Happy new year!

2 comentarios:

Raskolnikov dijo...

To be accurate, in a good design you would have to change your adaptor pattern implementation [1] rather than the facade :D [/tocapelotas]

[1] http://en.wikipedia.org/wiki/Adapter_pattern (Wikipedia implements it via inheritance but I'd rather do it via composition, but it is ok :p)

Chris dijo...

I'll have to compare Liblinear to SVM^light next time I do some classification.