Unsupervised representation learning with Minimax distance measures