0
$\begingroup$

I am trying to come up with a metric to calculate user preference correlation for my final project (a web-shop for shoes) at school. Originally I intended to include user ratings and use Pearson's correlation coefficient but building a rating system might be part of the exam so I have to leave that to the side for now.

I decided to compare purchases directly, taking binary values based on the number of purchases from the first user. This, of course, isn't terribly accurate. So, after looking at the various attributes of the shoes, I am trying to incorporate preferences in brands and style.

For each shoe that is bought by both a 1 is awarded (0 if the shoe is bought only by user1), for brands and styles I was thinking 0.8 and 0.6 respectively.

But then I lose the thread. I am not sure how to combine the variables in a relevant way. I would really appreciate any hints or tips.

(Also, this is a part of the project that I decided to build in myself and is most definitely not required. I am not attempting to cheat by asking here; I just want to learn.)

$\endgroup$
0
$\begingroup$

After staring at it for a good while, I came to the conclusion that I could, in fact, use Pearson's.

I dropped the direct comparison with shoes bought and instead took "Brand", "Style" and "Material" as variables.

For each user I take all the shoes they have bought, from that I calculate the number and kinds of brands, styles and materials and store these in dictionaries. So if the user bought 10 pairs of adidas these 10 would count as his rating of the brand.

The intersect of the dictionary keys supplies the values for the Pearson. At the end I add them together and divide by 3; probably not the best or most elegant solution but it works.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.