Building a machine learning recommendation system in under a minute

Theoratically there are only two steps to this (well, three if you count the cd).
Clone GitHub repository available here.

Change to that directory using cd. Assuming you have gradle installed, run:

You should see output like:

The highlighted lines are the recommendations that have been generated. The training data set for this can be found in src/main/resources/dataset.csv file. You can also find it here.

From those highlighted lines, the item:12, item:13 and item:14 refer to the ItemId (second column in data set) and value:4.83, value:4.66 and value:4.33 refer to the recommendation strength. This range depends on the implementation.

Looking at the code in Starter.java file, the recommendation is made for UserId (first column in data set) 2. By providing 3 as the second argument we’re asking for 3 item recommendations for this user.

Well, so now that you have the basic framework in place, feel free to play with the UserId values for recommendation, recommendation sizes or even with the data set itself. The more training data you add to the data set, the more accurate its recommendations will be.