O'Reilly logo

Java Deep Learning Projects by Md. Rezaul Karim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Training and test set preparation

Now that we have seen how to convert rating, movie, and metadata, we can now start creating training, test, and validation sets from the data in LibFM format. First, we set the path of the LibFM files to be used as follows:

//SplitDataWithMetaData.javaprivate static String ratinglibFM = formattedDataPath + "/" + "ratings.libfm"; // inputprivate static String ratinglibFM_train = formattedDataPath + "/" + "ratings_train.libfm"; // for traningprivate static String ratinglibFM_test = formattedDataPath + "/" + "ratings_test.libfm"; // for testingprivate static String ratinglibFM_test_meta = formattedDataPath +"/"+"ratings_test.libfm.meta";// metadataprivate static String ratinglibFM_valid = formattedDataPath

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required