grahamjenson / ger

Good Enough Recommendation (GER) Engine
376 stars 47 forks source link

Finding similar people? #44

Open mgreer opened 8 years ago

mgreer commented 8 years ago

Since GER is already using similarity to recommend items, could there be a straight up API for finding similar people themselves?

Very very useful for community building.

grahamjenson commented 8 years ago

Hey, there are no plans at the moment to add a direct API for person similarity... BUT there are two methods that can be used right now to implement such a method:

  1. person_neighbourhood which takes a person and returns a list of people that are (probably) similar to them
  2. calculate_similarities_from_person which will take a person and a list of people and return an object with all the people and their weights

To hook them up it would look like:

person_to_look_at = "Alice"
ger.person_neighbourhood(namespace, person_to_look_at, actions, configuration)
.then( (people) ->
  ger.calculate_similarities_from_person(namespace, person_to_look_at, people, actions, configuration)
)
.then( (similar_people) ->
  #a list of similar weighted people to be sorted and returned
)

I am going to leave this issue open, because although there are no plans now it will probably be added in the future.

mgreer commented 8 years ago

Solution works great! Thank you!