Creating a training dataset