Skip to content

Commit a48bd9c

Browse files
author
Bob Carpenter
committed
Merge pull request #17 from master/fix_lda
fix sim-lda script Thanks --- that one was my fault. I keep forgetting to clear the environment before testing the scripts.
2 parents 908c45f + cf36c6f commit a48bd9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

misc/cluster/lda/sim-lda.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ avg_doc_length <- 10;
1313
doc_length <- rpois(M,avg_doc_length);
1414
N <- sum(doc_length);
1515

16+
alpha <- rep(1/K,K);
17+
beta <- rep(1/V,V);
18+
1619
theta <- rdirichlet(M,alpha);
1720

1821
w <- rep(NA,N);
@@ -27,7 +30,4 @@ for (m in 1:M) {
2730
}
2831
}
2932

30-
alpha <- rep(1/K,K);
31-
beta <- rep(1/V,V);
32-
3333
dump(c("K","V","M","N","z","w","doc","alpha","beta"),"lda.data.R");

0 commit comments

Comments
 (0)