From cf36c6f10e4bfcebca15690e6b126682f7c043d2 Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Thu, 8 Jan 2015 16:47:10 +0100 Subject: [PATCH] fix sim-lda script --- misc/cluster/lda/sim-lda.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/cluster/lda/sim-lda.R b/misc/cluster/lda/sim-lda.R index f3368f041..7eae66524 100644 --- a/misc/cluster/lda/sim-lda.R +++ b/misc/cluster/lda/sim-lda.R @@ -13,6 +13,9 @@ avg_doc_length <- 10; doc_length <- rpois(M,avg_doc_length); N <- sum(doc_length); +alpha <- rep(1/K,K); +beta <- rep(1/V,V); + theta <- rdirichlet(M,alpha); w <- rep(NA,N); @@ -27,7 +30,4 @@ for (m in 1:M) { } } -alpha <- rep(1/K,K); -beta <- rep(1/V,V); - dump(c("K","V","M","N","z","w","doc","alpha","beta"),"lda.data.R");