# How to handle a feature set with unordered members?

I ask a group of people for the age of their 10 best friends, and will try to predict some output variable on basis of that. I don't ask them to rank these friends in any way, thus each person I ask gives rise to an unordered set of 10 input values, as well as some output variable. But as a feature vector is intrinsically ordered, I wonder what is the best way to map this unordered set into a feature vector.

I could sort the values, but the fundamental problem remains: there is little intrinsically common about, say, the third column that doesn't apply to the fourth column. Thus treating them as distinct dimensions seems questionable. Moreover, if the input values had been categories rather than numerical values, there wouldn't necessarily be any natural order to sort them by.

I could of course use summary statistics (mean, median, min, max, standard deviation, etc.) instead of the values themselves, but summary statistics inevitably leads to loss of information.

So my question is: Is there an established way of constructing a feature vector when the input values are naturally unordered?

• Some related questions: stats.stackexchange.com/questions/63460/…, datascience.stackexchange.com/questions/30918/… Commented Dec 3, 2019 at 2:09
• You could represent the variables as empirical distributions, then maybe look at stats.stackexchange.com/questions/tagged/… Commented Dec 3, 2019 at 2:12
• Could you add (a link to) the data, so we can experiment? Commented Dec 3, 2019 at 5:00
• Yes, I think letting the feature dimensions be values or value ranges of an empirical distribution is the way to go. Similar to the bag-of-words approach in NLP. Commented Dec 3, 2019 at 15:03