Building training data set