[Gllug] Algorithm question for your Friday morning

Tom Schutzer-Weissmann trmsw at yahoo.co.uk
Fri Nov 17 11:24:35 UTC 2006


On Fri, 2006-11-17 at 10:23 +0000, Adrian McMenamin wrote:

> I have some code that currently takes an arithmetic mean of people's
> preferences/votes. But it occurs to me that it would be better to replace
> that with some sort of algorithm that weights historical votes less than
> more recent votes.
> 
> (I believe top(1) uses an exponential decay function)
> 
> Is there a simple way to do this when the only record I currently have of
> historic votes is the arithmetic mean?

Morning Adrian,

If you only have the mean value, then you don't have any record of
historic votes and you won't be able to recreate them in order to apply
a different function!?

Here's a mean value: 4, average of only 2 votes. How many solutions to
(a + b)/2 = 4 can you find on a Friday morning?

Or do you mean, you have a _series_ of mean values, from the time when
only one person had voted, through to the present? Or something?

regards,

TomSW

Send instant messages to your online friends http://uk.messenger.yahoo.com 
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list