Skip to content
Browse files

Merge pull request #27 from jakemannix/jake/fix_doctopic_persistence_…


Fixes doc-topic persistence
  • Loading branch information...
2 parents f4ffc8e + 0ae8d27 commit 16ea0f3d3b011d9a8f0565b238c26b2311925325 @jakemannix jakemannix committed Dec 21, 2012
6 core/src/main/java/org/apache/mahout/clustering/lda/cvb/
@@ -25,6 +25,7 @@
import org.apache.hadoop.mapred.Reporter;
import org.apache.hadoop.mapred.lib.MultipleOutputs;
import org.apache.hadoop.mapreduce.Counter;
+import org.apache.mahout.common.RandomUtils;
import org.apache.mahout.math.DenseMatrix;
import org.apache.mahout.math.DenseVector;
import org.apache.mahout.math.Matrix;
@@ -96,8 +97,9 @@ public void configure(JobConf conf) {"No model files found, starting with uniform p(term|topic) prior");
Matrix m = new DenseMatrix(numTopics, numTerms);
m.assign(1.0 / numTerms);
- readModel = new TopicModel(m, new DenseVector(numTopics).assign(1.0), eta, alpha, null,
- numTrainThreads, modelWeight);
+ readModel = new TopicModel(numTopics, numTerms, eta, alpha,
+ RandomUtils.getRandom(c.getRandomSeed()), null,
+ numTrainThreads, modelWeight);
}"Initializing write model");

0 comments on commit 16ea0f3

Please sign in to comment.
Something went wrong with that request. Please try again.