I got the chance to try and code up my idea for an unsort algorithm this evening.
Didn't get too far though, for a number of reasons.
- I was coding in Elixir and I'm still learning the very basics, like how to format an
- I realised that I still haven't quite successfully pinned down how best to measure the 'spread' reliably.
I eventually got a function that will take a list and evaluate the 'spread'. Of course when testing it, I realised that my idea still had some flaws.
However, I definitely feel I am getting closer, and with the liberal addition of a few square roots, it is starting to resemble something that qualitatively reflects what I expect.
Using square roots in the metric is interesting. I spent many years evaluating a number of strange and weird metrics in the area of data approximation where the most common 'norms' are l1, l2 and l-infinity. There are also strange hybrid measures such as the Huber M-estimator which I played around with quite a lot.
What is interesting about all these previous measures is that the 'power' used was always at least 1. This makes sense, as these were all trying to create measures that made sense when fitting a curve to some data.
Now, however, I am effectively doing the opposite and trying to keep that curve away from the data. So it's no real surprise that I am entering the forbidden territory of powers less than 1.
No doubt there are dragons to be aware of, but I continue on, regardless!