Algorithms to study and reduce dimensions of datasets