I am trying to find the best algorithm to create a list of recommendations for a user based on the interests of all other users.
Say I have a list of of samples:
$samples = [ ['hot dog', 'big mac', 'whopper'], ['hot dog', 'big mac'], ['hot dog', 'whopper'], ['big mac', 'dave single'], ['whopper', 'mcnuggets', 'mcchicken'], ['mcchicken', 'original chicken sandwich'], ['mcchicken', 'mcrib'] ];
And we will say each array in the sample list is unique user's food preferences.
Let's say now I have a user with this food preference:
['hot dog', 'mcchicken']
I want to be able to recommend to this user other foods that other users have in their preferences.
So in the simplest terms, it should return:
['whopper', 'big mac', 'original chicken sandwich', 'mcrib', 'mcnuggets']
Obviously I will also introduce other variables such as how each user rates each item in their preference list and also the percentage of users that need to have that item in order to use their other food items as recommendations.
But I would like to find the best algorithm to start working on it.
At first I thought
Apriori might be my best guess, but I wasn't having luck once I introduced multiple items.