You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Jonathan Ellis <jb...@gmail.com> on 2011/05/03 21:30:19 UTC
Re: inconsistent implementation of 'cumulative distribution function'
for Exponential Distribution
I don't know which is correct. It's possible that both are, because
of differences in how they are used.
Created https://issues.apache.org/jira/browse/CASSANDRA-2597 to look into this.
On Sat, Apr 2, 2011 at 7:12 AM, pprun <pz...@gmail.com> wrote:
> Hi Cassandra DEVs,
>
> I just found there are two implementations of 'cumulative distribution
> function' for Exponential Distribution and there are inconsistent :
>
> *FailureDetector*
> org.apache.cassandra.gms.ArrivalWindow.p(double)
> double p(double t)
> {
> double mean = mean();
> double exponent = (-1)*(t)/mean;
> return *Math.pow(Math.E, exponent)*;
> }
>
> *DynamicEndpointSnitch*
> org.apache.cassandra.locator.AdaptiveLatencyTracker.p(double)
> double p(double t)
> {
> double mean = mean();
> double exponent = (-1) * (t) / mean;
> return *1 - Math.pow( Math.E, exponent);*
> }
>
> According to the Exponential Distribution cumulative distribution function
> definition<http://en.wikipedia.org/wiki/Exponential_distribution#Cumulative_distribution_function>,
> the later one is clear, however,
> Could you please explain a bit for the implementation of FailureDetector?
>
> Thanks*,
> *pzgyuanf*
> *
>
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com