Python metric learning code issue

2 points by mikebotazzo ↗ HN
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

[ 3.6 ms ] story [ 16.0 ms ] thread
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.
You're already using numpy, so I don't think you'll get much of an increase (if any) by porting to Matlab.