How to input a list into my model and not have it care about order

I'm trying to predict a list of numbers, e.g:

[23,55,198,200,64]

The data I have includes multiple things, along with:

The numbers from the previous run (These numbers come from scientific experiments)

A list of all previous lists of numbers

So for example if two runs ago we got [22,24,77,187,21],

and the run after that we got [90,22,76,88,29],

we would now have a list of

[[22,24,77,187,21],[90,22,76,88,29]]

The important thing is that it doesn't matter what order the numbers are in.

[22,24,77,187,21] and [77,22,187,24,21] are both the same thing.

How do I go about feeding my model this data, in a way that it realizes that both options are correct?

Topic theory data machine-learning

Category Data Science


If the range of possible integers is small, encode the presence of each integer as a boolean column in a feature vector.

Example with a value range of 0-5.

[1,3,4], [4,3,1], [3,1,4] would all be encoded as [0,1,0,1,1,0]


Having a series of numbers, in which the order doesn't matter from a scientific point of view, does not necessarily make them easily comparable from a programming point of view.

A simple way to compare them is to sort them systematically first (maybe in a separated array if you need to keep the initial data), even if their order does not matter.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.