commit 46aa334c7223b44606f45c906b43287364717a33
parent 5a1308f14b3a10e2331de8031d539714ce9b2c6d
Author: Jared Tobin <jared@jtobin.ca>
Date: Thu, 10 Mar 2016 17:08:16 +1300
Correct standard deviation.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/finite-gaussian-mixture/src/fmm_conditional.r b/finite-gaussian-mixture/src/fmm_conditional.r
@@ -74,7 +74,7 @@ conditional_location_model = function(y, z, s, l, r) {
m = (yt * s + l * r) / (n * s + r)
v = 1 / (n * s + r)
- mapply(rnorm, 1, m, v)
+ mapply(rnorm, 1, m, sqrt(v))
}
conditional_precision_model = function(y, z, m, b, w) {