Add a to_string() method to Train/TestSample records