Cosine similarity for user recommendations -


is cosine similarity approach deciding if 2 users similar based on responses questions?

i'm trying have users answer 10 questions , resolving responses 10-dimensional vector of integers. plan use cosine similarity find similar users.

i considered resolving each question integer , summing integers resolve each user single integer, problem approach similarity measure isn't question specific: in other words, if user gives answer question 1 resolves 5 , answer question 2 resolves 0, , user responds question 1 0 , question 2 5, both users "sum 5", answered each question fundamentally differently.

so cosine similarity give similarity measure based on each attribute?

summing integers resolve single integer per user not seem right.

i think cosine similarity helps here similarity measure, can try others jaccard, euclidean, mahalanobis etc.

what might intuition behind cosine similarity. idea once create 10 dimensional vectors working in 10 dimensional space. each row vector in space, numbers in each components important, cosine between 2 vectors give idea of how good/bad aligned vectors are, if parallel , angle 0 means go same direction, means components proportional, similarity maximum in case, (example 2 users answered exact same numbers in questions). if components start differ in example users gives 5 question , other gives 0 vectors fill have different directions, larger difference between answers more separated vectors be, larger angle between them, results in lower cosine , hence similarity.

there other similarity measures mentioned above, 1 thing ppl try several of these measures vs test set , sees 1 performs better.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -