What is the best way to setup a database for paired comparisons?

Viewed 37

I want to run some paired comparisons on (let's say) 500 fruits. My list of fruits looks like this:

id fruit
1  Apple
2  Banana
3  Peach
...

From this list, I created all relevant pairs (without duplicates) using itertools.combinations in Python. These are >100k pairs. I added two columns for keeping track of responses:

pair fruit1 fruit2 seen decision
1    Apple  Peach  0    0
2    Apple  Banana 1    2
...

As you can see, the first pair has not been seen yet by the user. The second pair has been presented to the user (seen=1) and the user preferred Banana (decision=2).

This file is, obviously, rather large and a mess to work with. I was wondering whether there would be a more elegant way to do this. Ideally, I would only have the list of fruits that I showed you at the top and I would then generate the pairs on the fly during data collection. However, how do I keep track of responses and of already presented pairs without referring to the data format I am currently using?

Edit: There are some rules to the pairs.

  • No "Apple vs. Apple": There cannot be comparisons between the same fruit.
  • Either "Apple vs. Banana" or "Banana vs. Apple" but not both - No duplicates are allowed, even with different order.
0 Answers
Related