make_train function

Generate a variable used to selected a training sample