Here's some code I have written, mostly implementations of various machine learning algorithms in Matlab, but there are also some other hacks.
Matlab
- Combining Discriminative Features to Infer Complex Trajectories This is the code for the learning/tracking algorithm presented in our ICML 2006 paper. To obtain the corresponding data, please send me an email. cdf_2007-07-13.zip
- Multiple Cause Vector Quantization and Factor Analysis This is the code for the MCVQ and MCFA models, and some of the experiments, described in my JMLR and NIPS papers. I have also modified the MCVQ function to run in parallel using MPI, requiring my slightly improved version of MatlabMPI. mcvq_mcfa_2006-11-09.zip mcvq_mpi.m face data
- Incremental Visual Tracking This code implements the incremental PCA-based tracker, for locating and following an object in video, as described here. Included in this bundle are 5 different ways of implementing PCA, 2 of which are incremental, and a script for comparing their runtimes and accuracies. Video data for use with the tracker is available on this website. ivt-2008-05-04.tgz
- Label a Video Sequence This Matlab code lets you use the mouse to label the ground truth location of a target object in a video sequence. label_sequence.m and fill_in_using_spline.m
- Non-Negative Matrix Factorization
This is an implementation of Lee & Seung's Non-Negative Matrix Factorization algorithm. nnmf.m - Agglomerative Clustering
In this clustering algorithm, each data point begins in its own cluster, and the clusters are merged using various criteria until only the desired number of clusters remain. My implementation follows the description given here by Brian T. Luke agglomerative.tgz - Lambert W Function adapted for Matlab from Octave code by Nicol N. Schraudolph. Included as well is an implementation of Matthew Brand's version, as proposed in his paper Structure Learning in conditional probability models via an entropic prior and parameter extinction, Neural Computation 11, 1999. LambertW.m, BrandW.m
- Probability Distribution Functions evaluate and draw samples from Dirichlet and Multinomial distributions. dirichletrnd.m dirichletpdf.m test_dir.m multirnd.m multipdf.m
- MEX functions for speed! Most Matlab code can be made
much faster by replacing the slowest functions with Matlab
extension (MEX) functions written in C. I'm sure every Matlab
hacker has a collection of these functions that get reused again
and again. Here are mine:
- binary search of a sorted array (returns all matches)
- softmax (exp(x) ./ sum(exp(x)))
- sampling from a discrete-valued probability distributions
- multiplication and weighted summation of 3-dimensional arrays
- resampling and histogram equalization of images
- Support Vector Machine Classification (I didn't write this, but I like it a lot. I've fixed a few bugs and updated the version of libsvm it uses.) osu-svm-dross.zip. See also libsvm OSU SVM Classifier Matlab Toolbox
Parallel Programming
Other Hacks
- Automatic urchinTracker This script automatically adds the urchinTracker code required by Google Analytics (as described here) to all links on your webpage. This eliminates the need to clutter your HTML with onClick="javascript:urchinTracker ...". add_urchin.js