News for hackers. Stuff that matters.

Python metric learning code issue

Hi I'm making some studies with metric learning and using Python to test some cases. However I'm doing some heavy calculations and my console is failing to deal with the values (I'm in an environment configured with Anaconda + Spyder). I want to convert the code below into Matlab to optimize the calculations. If there is someone that master Matlab and would be willing to convert the code, I would be grateful.

https://gist.github.com/mikebotazzo/2c7931586d1d8a32dd7b

( 3 comments | 2 points | on HN )
Re:Python metric learning code issue by zwiteof on Saturday June 20, 2015 @10:36PM (#9751920)
Why MATLAB? If you're looking to optimize, that's the opposite direction I'd be going. Numba, Cython or writing C or Fortran if you really need the speed is where you should be going imo.
Re:Python metric learning code issue by 88e282102ae2e5b on Sunday June 21, 2015 @02:06AM (#9752392)
You're already using numpy, so I don't think you'll get much of an increase (if any) by porting to Matlab.
Re:Python metric learning code issue by mikebotazzo on Sunday June 21, 2015 @06:08AM (#9752839)
Well, based in the content of this link http://wiki.scipy.org/PerformancePython, now I believe there is not that much difference in performance, but I still would like to try the Matlab code