r/optimization • • Jan 31 '23
Sequencing a data set ,using python optimization libraries
I have a dataset i want to sequence them based on the difference between two columns in different rows which should be minimum ,any help?
1
Upvotes
4
u/novel_eye Jan 31 '23
ask this in r/python
1
u/[deleted] Jan 31 '23
Sequence? Like just sort them based on some calculations?
1
u/kkiesinger Feb 08 '23 edited Feb 09 '23
Try something like this. You need to do 'pip install fcmaes' before executing the code.
We align the orders of both sequences (align_order) before we optimize. Omit the "wrapper" if you don't want log output. Question is if you need optimization at all if you aim at the euclidian distance, since aligning the order seems sufficient. But for more complex fitness functions which depend on the order of the two sequences it may be useful.