home publications » resources about me Code mparser v0.1 A matlab lexer / parser based on ANTLR with MEX bindings that let you examine and manipulate the parse tree within matlab itself. General prioritized solver (GPS) v1.1 A massively parallel value iteration engine which implements prioritization and partitioning. Includes code to generate MDPs from different continuous control problems such as mountain car and double-arm pendulum. Double-arm pendulum simulator A double-arm pendulum simulator written in wxWindows. HOWTOs Making movies with Geomview Introductory Papers / References I've Found Useful Petersen's excellent matrix cookbook Wallach's intro to conditional random fields MacKay's intro to MCMC Walsh's intro to MCMC and Gibbs sampling Shewchuk's intro to conjugate gradients (without the agonizing pain!) Edelman's optimization on the Stiefel/Grassman manifolds von Luxburg's tutorial on spectral clustering Roth's survey of appearance-based methods for object recognition Schake's properties of the Kronecker product The AMS Latex Users Guide Matlab Scripts Incremental SVD updates Given the thin SVD of a matrix (X=USV'), update it in a number of interesting ways, while preserving the rank of the result. svd_update.m - update the SVD to be [X + A'*B]=Up*Sp*Vp' (a general matrix update). addblock_svd_update.m - update the SVD to be [X A] = Up*Sp*Vp' (add columns [ie, new data points]) rank_one_svd_update.m - update the SVD to be [X + a*b'] = Up*Sp*Vp' (that is, a general rank-one update. This can be used to add columns, zero columns, change columns, recenter the matrix, etc. ).   See Matthew Brand, "Fast low-rank modifications of the thin singular value decomposition". Recursive least squares rls.m - Basic recursive least squares. qr_rls.m - Square-root version of RLS using a QR decomposition. bqr_rls.m - Block square-root version of RLS using a QR decomposition (you can add multiple rows at a time). Kernel Recursive Least Squares dict_init.m - Part of the dictionary implementation used by KRLS algorithm. Can stand alone. dict.m - Part of the dictionary implementation used by the KRLS algorithm. Can stand alone. krls_init.m - Kernel recursive least squares initializer. krls.m - Main KRLS function. Repeatedly called with new data points. krls_query.m - Query the resulting estimator. krls_example.m - An example script showing the different parts. Mutual information based on quadratic entropies Here are scripts for computing mutual information based on quadratic Renyi and Tsallis entropies, when the PDFs are assumed to be based on a kernel density estimate with a Gaussian kernel. The fast versions use Nystrom approximations to speed things up. Requires the rbf4.m script below. quad_renyi.m quad_renyi_fast.m quad_tsallis.m quad_tsallis_fast.m Fast Gaussian kernel evaluations Very fast versions of Gaussian kernel evaluations. There are four versions: the first uses spherical covariances, the second is like the first but without a normalizer, the third uses a full covariance matrix (no normalizer), and the fourth uses a (non-uniform) diagonal covariance matrix (no normalizer). rbf4.m rbf4nn.m rbf4nn_mat.m rbf4nn_vecss.m krondecomp.m Given a matrix A (of size m1*m2, n1*n2), find its optimal kronecker decomposition (that is, find matrices B,C which minimize norm( A - kron(B,C), 'fro' )**2 ). See Van Loan and Pitsianis, "Approximation with Kronecker Products." rrr.m Reduced rank regression. Solves the system of equations X*A = B, subject to rank(X)=k. (Nick Firoozye points out that this method is not exactly the maximum likelihood method. Unfortunately, I can't remember where I obtained this method. Nick has contributed an alternative RRR script below, which is a more faithful implementation.) rrr2.m Nick Firoozye's reduced rank regression. lds2plg.m Convert the parameters of a linear dynamical system to the parameters of a predictive linear gaussian model. See Rudary, Singh and Wingate, "Predictive Linear-Gaussian Models of Stochastic Dynamical Systems." kpca_n.m Fast version of kernel PCA. pca_n.m Fast version of PCA. subsample.m Subsample the columns of a matrix. mahdist.m Fast Mahalanobis distance evaluator. Perl Scripts mdp2metis.pl mdp2xgmml.pl mtx2metis.pl Scripts for dealing with MDPs and MTX (Matrix Market) graph files, mostly with an eye to massaging them into a format suitable for partitioning by METIS. samurai blog family