Here's the code. It was written to demo, and not to share, so there are a few caveats. I hardcoded some paths in src/classification.
You'll have to install libsvm. I installed it from Mac homebrew. I also didn't create Gemfiles. I believe I used chunky_png, rb-libsvm, and sinatra.
To run the clustering gnuplot examples, you'll need gnuplot. The files
have a .txt extension and can be run like: gnuplot < file.txt