Machine learning algorithms to analyze large medical image datasets