code to create training set with plugged-in features from the labeled data