Rescale the weights in an edge matrix to match a given perplexity. From 'largeVis', https://github.com/elbamos/largeVis
Useful links