title: How can I infer a new document against Mahout TopicModel output?
body: <p>Given a topic model from Mahout LDA CVB program/offline batch execution,
  I like to infer a new document using the model/online web service calls.</p>
  
  <p>These documents are not incrediably helpful for new-ing and infer-ing.
  * <a href="https://builds.apache.org/job/Mahout-Quality/javadoc/org/apache/mahout/clustering/lda/cvb/TopicModel.html" rel="nofollow">https://builds.apache.org/job/Mahout-Quality/javadoc/org/apache/mahout/clustering/lda/cvb/TopicModel.html</a>
  * <a href="http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/lda/cvb/TopicModel.java?view=markup" rel="nofollow">http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/lda/cvb/TopicModel.java?view=markup</a></p>
  
  <p>I couldn't even find any sample code on the Internet or somewhere.</p>
  
  <p>Here, I thought that I might want to do in Java code,</p>
  
  <p><code>TopicModel model = new TopicModel();</code></p>
  
  <p><code>Vector documentInTermFrequency = new RandomAccessSparseVector();</code>
  <code>documentInTermFrequence.setQuick(termIdX, 10);</code>
  <code>documentInTermFrequence.setQuick(termIdY, 20);</code></p>
  
  <p><code>Vector docTopic = new DenseVector(new Double[10] { 0.1, 0.1, ..., 0.1 }); // 0.1 probabilities</code></p>
  
  <p><code>Vector documentTopicInference = model.infer(documentInTermFrequence, docTopic);</code></p>
  
  <p>I haven't seen anyone who tried something like this? Has anyone ever tried something like this?</p>
  
  <p>Any suggestion or pointer will be highly appreciated.</p>