I'm trying to match items. Given a set of $n$ items I can rank on a scale from 0 to 100 of how similar they are to one another. For instance, if item $n_1$ is milk and item $n_2$ is also milk, then the similarity between $n_1$ and $n_2$ would be 100%. If $n_3$ is soda, then the similarity between $n_1$ and $n_3$ would be, perhaps, 80%, and so on.
I'm trying to figure out how to group the $n$ items into groups of similar items, but it's a challenging problem. I run into the following issue: A horse is similar to a cow, which is similar to a goat, which is similar in part to goat cheese, which is similar to cheese, which is correlated with crackers. However, I wouldn't expect a horse to be in the same group as crackers. Each item might be pair-wise correlated, but the beginning and end might not be.
Any ideas?