Wednesday, November 20, 2013

Auto Encoder and Matlab tricks

Today, I went through the Auto Encoder exercise by Andrew Ng's CS294A class at Stanford: http://ufldl.stanford.edu/wiki/index.php/Exercise:Sparse_Autoencoder.

The idea of auto encoder is unsupervised feature learning by learning a identity function with sparsity constraints. This idea is very cool by itself, and the exercise is extremely well written. What surprised me is that the quality of the Matlab skeleton code provided and how many Matlab tricks are there that I don't know before. Here is a few of them:


  • It turns out that you can do currying in Matlab.
  • If you call a function that returns multiple values and receive the return using only one value, then the first returned value is received. This is quite handy sometimes.
  • You can add a search path for scripts/functions, so you don't need to put all scripts/functions in the current directory!
  • You can save plots to file simply using the 'print' command.

No comments:

Post a Comment