1
$\begingroup$

I work at a company that sells clothes, and I've had good results with using cosine similarity to determine which products are "similar" to each other simply based on who owns them.

I wanted to take product recommendations a step further and recommend a "compatible" product (like a solid tie for a striped shirt) using a new dataset—so not just who owns what. I have a training set with this structure:

  • Every product has feature data like color, pattern, etc. (assume that these are ordinal measurements).
  • I have a yes/no target on some product pairs that says whether two products are compatible.

The goal is to be able to say that two new products are compatible, given the feature data for both products.

It's the pairwise aspect that's throwing me off in the supervised learning framework.

If I were just predicting a binary target based on color, pattern, etc., that's a basic setup with several algorithms to choose from. But to me, the problem seems a little more complicated since the prediction is based on feature data from two products—and the prediction needs to be symmetric so that it is the same no matter which product comes "first." Thus, I'm trying to get a symmetric compatibility metric when I have (1) feature data on products and (2) target data on pairs of products.

$\endgroup$
1
$\begingroup$

For each pair of examples, introduce both permutations to your training matrix. If necessary, at evaluation time average the results of both permutations.

$\endgroup$
  • $\begingroup$ What do you think about the symmetry aspect? Perhaps it's overcomplicating things to find a mathematical way to guarantee that the target for (product1 features, product2 features) equals the target for (product2 features, product1 features). But it seems like that would be a desirable characteristic of a "compatibility" metric. $\endgroup$ – Niels Joaquin Aug 7 '14 at 15:48
  • $\begingroup$ I researched this problem intensely about 5 years ago. There are 3 aspects to a proper distance metrics; non-negativity, symmetry and the triangle inequality. The proper approach to metric learning is summarized here: citeseerx.ist.psu.edu/viewdoc/… but if you're just build a recommender system from a classifier with side information, then the permutation suggestion is the simplest thing that could work. Try it and analyse the accuracy before discarding it. It works surprisingly well because you have all of the usual classifiers to experiment. $\endgroup$ – Jessica Mick Aug 7 '14 at 22:21

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.