Representation learning and algorithms in hyperbolic spaces