The FM-based model that we are going to reuse can consume the training data only in LibFM format, which is more or less the same as LibSVM. Therefore, first, we must format the MovieLens 1M dataset sp that the training dataset contains both users, movies, and existing rating information.
At the same time, new features will be generated by the user information and movie information. First, we will define the input (this will be updated according to users, movies, and ratings) and output file path as follows:
//MovieLensFormaterWithMetaData.java ...