bnp

Some older Bayesian nonparametrics research.
Log | Files | Refs | README | LICENSE

commit 2695828332fb86e2c67dd86f2c123a81a10f7e98
parent 4136c0236c0cba3a4bf73134602decc2d30fbebb
Author: Jared Tobin <jared@jtobin.ca>
Date:   Sun, 14 Feb 2016 17:24:48 +1300

Finish generative code for FMM.

Diffstat:
Mfinite-gaussian-mixture/src/fmm_multivariate_generative.r | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/finite-gaussian-mixture/src/fmm_multivariate_generative.r b/finite-gaussian-mixture/src/fmm_multivariate_generative.r @@ -17,7 +17,9 @@ parameter_model = function(m, k, n) { } data_model = function(config) { - mapply(safe_rmvnorm, config[[1]], config[[2]], config[[3]]) + raw = mapply(safe_rmvnorm, config[[1]], config[[2]], config[[3]]) + frame = function(m) { data.frame(x = m[,1], y = m[,2]) } + lapply(raw, frame) } model = function(m, k, n) {