
1 Oct
2012
1 Oct
'12
6:11 p.m.
Just thought I would toss the list a problem I need to solve and see what I can learn from the solutions here. My problem is that I need to take a list of Double and map them into "percentile" form (not sure if I have that terminology correct) - so that the lowest number is mapped to 0, the highest number is mapped to 1, the median is mapped to 0.5, and in general given a fixed delta D and an interval (x, x +D) in the percentile domain, the same number of elements get mapped into that interval for any x. Except there aren't an infinity of values and there may be ties, so it gets a little fuzzier how to define it. so I need: toPercentile :: [Double] -> [Double] I shall now work on it and report back. Dennis