Archives
-
CVXOPT + Pythonika = convex optimization from Mathematica
One of the reasons why I use Matlab more than Mathematica is Matlab supports convenient convex optimization via the open source CVX package, while Mathematica doesn’t seem to have any support even via (open source) third party packages for convex optimization.
Now it seems I’ve found a relatively easy way to rectify this, by interfacing Mathematica [...]Feb 27th, 2010 | Filed under Mathematics, Programming -
CVX implementation of Alon and Naor’s SDP for approximating the cut norm (infinity to 1 operator norm)
Surprisingly, I couldn’t find this in an Internet search, so I implemented the algorithm using CVX.
%% [X,Y,VAL] = INF1NORM(A) provides a probabilistic lower bound on the
% infinity->1 operator norm of A, to within a guaranteed factor, in
% expectation.
%
% (since the quality of the approximation is only guaranteed in
% expectation, you should call several times and [...]Jan 27th, 2010 | Filed under Mathematics, Programming -
A failed attempt to use an SDP to find a nonorthogonal factorization
I’m looking at a nonorthogonal factorization problem: given a symmetric matrix , write it as where the columns of all have norm less than one, is diagonal, and are chosen to achieve , where the minimization is taken over all such .
Why do I care about this problem? My advisor [...]Jan 17th, 2010 | Filed under Mathematics, Programming -
A resolution: become a better vim user
I read Bram Moolenaar’s essay on effective text editing earlier today, and in the spirit of the beginning of a new year, made the resolution to learn how to use vim more effectively. In particular, I need to get a grip on the way buffers and files are handled in vim, learn how to cut [...]
Jan 2nd, 2010 | Filed under General, Programming -
Poisson Image Editing
I spent the last several days implementing a very crappy version of Perez, Gangnet, and Blake’s famous “Poisson Image Editing” paper. The idea was to implement a simple but meaningful and useful project to refresh my C++ knowledge, and to work a bit with CImg.
The idea is that, to seamlessly merge information from a region [...]Dec 29th, 2009 | Filed under Mathematics, Programming -
A really crappy EIAS .img format loader for Mathematica
About three hours ago, I decided I’d read about OpenGL and experimented enough with it to attempt loading a heightfield and visualizing it as a collection of flat shaded triangles. Obviously, the first step is to find heightfields to work with; since this is going to be a crappy visualization, I decided to look for [...]
Dec 24th, 2009 | Filed under Programming -
Mathematica speed question
It sucks that I’m the closest thing to a Mathematica expert that I know personally. When I have Matlab questions, there are a few people who have a decent chance of being able to help me, but I’m pretty much on my own with Mathematica (not counting the kindness of Internet strangers).
One of my friends [...]Dec 19th, 2009 | Filed under Computer Algebra, Programming -
Libnoise
The libnoise site has made it onto my short list of awesome websites.
I’ve been obsessed with terrain generation for a long while now, and this is the best resource I’ve come across on generating landscapes using Perlin noise. The site is actually “just” the documentation for the eponymous libnoise C++ library, which is used [...]Dec 4th, 2009 | Filed under General, Programming -
Graph layout by Stress Majorization by Optimization of A Complicated Function
I haven’t had much to talk about lately– the Probabilistic Graphical Models course is eating up my time like crazy: I haven’t had time to do anything but that and prepare my lectures and homeworks for the Matlab/Mathematica course– but I have been doing a lot of coding for the course I’m teaching and the [...]
Nov 6th, 2009 | Filed under Mathematics, Programming