|
|
Useful Code
Possibly useful code. C++ unless otherwise noted; I'm a big fan of that language and the C++11 standard.
- Clustering algorithms
K-means, GMM clustering, hierarchical agglomerative clustering, mean-shift clustering and spectral clustering. With example driver files.
- Normalized cuts
A clustering algorithm widely used in computer vision; slow but performs better than a lot of other algorithms we have. A port of Jianbo Shi's MATLAB code to C++.
- Augmenting-Paths Max-Product
An implementation of the algorithm from Tarlow et al., "Graph Cuts is a Max-Product Algorithm", UAI 2011. This is a specialization of belief propagation that has the same optimality guarantees as graph cuts when all variables are binary and the energy is regular; the algorithm basically runs graph cuts in a way that allows us to have BP-like messages available at all times. I'm not sure what problem I'd apply this code snippet to, since there's a very good graph cuts library out there, but perhaps someone will produce a generalization of this algorithm to get graph-cuts-like speed from general belief propagation, and then here I'll be with code ready to adapt.
- MATLAB-like tuple assignment
Allow a syntax equivalent to the MATLAB function [a, b, c] = f()...; [d, e] = f(); %ignores c.
As far as a license: do whatever you want, but if you make whatever you use my code for publicly available, please give me credit (eg "originally written by").
|