[PATCH] Variance is defined as the sum of squared differences
Wald Commits
scm-commit at wald.intevation.org
Wed Dec 18 12:39:35 CET 2013
# HG changeset patch
# User Tom Gottfried <tom.gottfried at intevation.de>
# Date 1387366758 -3600
# Node ID cead6df5b7b3ec6da1e63cd513e6ea028659325a
# Parent 8f1a5d0802b5edcfdb4c93eecaf5c0dd4672ae48
Variance is defined as the sum of squared differences.
diff -r 8f1a5d0802b5 -r cead6df5b7b3 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java Wed Dec 18 09:53:44 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java Wed Dec 18 12:39:18 2013 +0100
@@ -318,7 +318,7 @@
double sig = 0d;
for (i = 0; i < size; i++) {
- sig += ps[i] * Math.exp(phis[i] - phiM);
+ sig += ps[i] * Math.pow((phis[i] - phiM), 2);
}
double deviation = Math.sqrt(sig);
return deviation;
More information about the Dive4elements-commits
mailing list