Converting the dataset into LibFM format