Preparing the dataset for learning