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