Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: DJC Newsgroups: comp.lang.python Subject: Re: how to calculate reputation Date: Sat, 06 Jul 2013 15:23:25 +0200 Organization: qwpynex Lines: 20 Message-ID: References: Reply-To: nntp-e@djclark.eu Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 6 Jul 2013 13:17:48 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="abf87a241a2a7f3ca88cc6278b6123c5"; logging-data="3545"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RtQFEq6Q/Ud5EBEp5zNdF" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 In-Reply-To: Cancel-Lock: sha1:Z+yIfRGrx6xK2MCMuIt4Rs6gJmk= Xref: csiph.com comp.lang.python:50063 On 03/07/13 02:05, Mark Janssen wrote: >> Hi all, this seems to be quite stupid question but I am "confused".. >> We set the initial value to 0, +1 for up-vote and -1 for down-vote! nice. >> >> I have a list of bool values True, False (True for up vote, False for >> down-vote).. submitted by users. >> >> should I take True = +1, False=0 [or] True = +1, False=-1 ?? for adding >> all. >> >> I am missing something here.. and that's clear.. anyone please help me on >> it? > > If False is representing a down-vote, like you say, then you have to > incorporate that information, in which case False=-1 ==> a user not > merely ignored another user, but marked him/her down. You could express the result as 'x out of y users up-voted this' where x = total true and y = x + total_false