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.
These documents are not incrediably helpful for new-ing and infer-ing. * https://builds.apache.org/job/Mahout-Quality/javadoc/org/apache/mahout/clustering/lda/cvb/TopicModel.html * http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/lda/cvb/TopicModel.java?view=markup
I couldn't even find any sample code on the Internet or somewhere.
Here, I thought that I might want to do in Java code,
TopicModel model = new TopicModel();
Vector documentInTermFrequency = new RandomAccessSparseVector();
documentInTermFrequence.setQuick(termIdX, 10);
documentInTermFrequence.setQuick(termIdY, 20);
Vector docTopic = new DenseVector(new Double[10] { 0.1, 0.1, ..., 0.1 }); // 0.1 probabilities
Vector documentTopicInference = model.infer(documentInTermFrequence, docTopic);
I haven't seen anyone who tried something like this? Has anyone ever tried something like this?
Any suggestion or pointer will be highly appreciated.