Code for ICML 2014 paper: "Sample-based Approximate Regularization