On Saturday 02 August 2008 03:43, Daniel Cheng wrote: > On Fri, Aug 1, 2008 at 11:52 PM, Michael Rogers <m.rogers at cs.ucl.ac.uk> wrote: > > Daniel Cheng wrote: > >> in a circular space, we can get infinite number of "average" by changing > >> point of reference. --- choose the point of reference with the smallest > >> standard deviation. > > > > From an infinite number of alternatives? Sounds like it might take a > > while. ;-) I think we can get away with just trying each location as the > > reference point, but that's still O(n^2) running time. > > That's what I have in mind. > It is not as large as you think as we don't have to calculate every > single data point -- just take a good random sample of it should do. > > > How about this: the average of two locations is the location midway > > along the shortest line between them. So to estimate the average of a > > set of locations, choose two locations at random from the set and > > replace them with their average, and repeat until there's only one > > location in the set. > > > > It's alchemy but at least it runs in linear time. :-)
How about a klein filter? The average is initially set to the first hit's value. It then moves X% towards each report (in the direction of the shortest distance between its current value and the report). Simple and effective, no? IIRC we have such a class already, but review is always welcome. > > > > Cheers, > > Michael -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20080802/d992687e/attachment.pgp>