summaryrefslogtreecommitdiff
path: root/src/de/lmu/ifi/dbs/elki/math/statistics/distribution/estimator/GeneralizedExtremeValueLMMEstimator.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/math/statistics/distribution/estimator/GeneralizedExtremeValueLMMEstimator.java')
-rw-r--r--src/de/lmu/ifi/dbs/elki/math/statistics/distribution/estimator/GeneralizedExtremeValueLMMEstimator.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/math/statistics/distribution/estimator/GeneralizedExtremeValueLMMEstimator.java b/src/de/lmu/ifi/dbs/elki/math/statistics/distribution/estimator/GeneralizedExtremeValueLMMEstimator.java
index cdadf47d..a2802c24 100644
--- a/src/de/lmu/ifi/dbs/elki/math/statistics/distribution/estimator/GeneralizedExtremeValueLMMEstimator.java
+++ b/src/de/lmu/ifi/dbs/elki/math/statistics/distribution/estimator/GeneralizedExtremeValueLMMEstimator.java
@@ -4,7 +4,7 @@ package de.lmu.ifi.dbs.elki.math.statistics.distribution.estimator;
This file is part of ELKI:
Environment for Developing KDD-Applications Supported by Index-Structures
- Copyright (C) 2013
+ Copyright (C) 2014
Ludwig-Maximilians-Universität München
Lehr- und Forschungseinheit für Datenbanksysteme
ELKI Development Team
@@ -103,7 +103,7 @@ public class GeneralizedExtremeValueLMMEstimator extends AbstractLMMEstimator<Ge
// g: Almost zero?
if (Math.abs(g) < 1e-50) {
double k = 0;
- double sigma = xmom[1] / MathUtil.LOG2;
+ double sigma = xmom[1] * MathUtil.ONE_BY_LOG2;
double mu = xmom[0] - Math.E * sigma;
return new GeneralizedExtremeValueDistribution(mu, sigma, k);
}
@@ -113,7 +113,7 @@ public class GeneralizedExtremeValueLMMEstimator extends AbstractLMMEstimator<Ge
if (t3 < -.8) {
// Newton-Raphson iteration for t3 < -.8
if (t3 <= -.97) {
- g = 1. - Math.log(1. + t3) / MathUtil.LOG2;
+ g = 1. - Math.log1p(t3) * MathUtil.ONE_BY_LOG2;
}
double t0 = .5 * (t3 + 3.);
for (int it = 1;; it++) {