https://medium.com/@monocosmo77/research-based-on-metric-measure-spaces-in-machine-learning-part2-f204d535632f