User similarities algorithm -
let's have following data users
user1: {location: "topeka, ks", school: "university of texas", interests: ["running"] } user2: {location: "austin, tx", school: "university of texas", interests: ["knitting", "running"] } user3: {location: "topeka, ks", school: "university of kansas" interests: ["kayaking"]}
given information, i'm writing matching algorithm pairs "best" users. there few criteria -
not properties weighted equally. let's "location" far more heavily weighted other property. in above though users 1 , 2 share 2 properties (school , "running"), best match user 1 still user 3 because of high weight of location
the algorithm, when running @ scale, should performant. means i'd avoid comparing each user individually each other user. n users o(n^2) operation. ideally i'd develop sort of "score" can generate each user in isolation, since involves looping through users once. can find other users similar scores , determine best match based off that.
the list of interests, locations, schools, etc... not known ahead of time. provided external api , literally string.
is there sort of known algorithm optimizes pairing in way?
thanks!
Comments
Post a Comment