How can I conclude a new document with the release of Mahout TopicModel?

Given the thematic model from Mahout LDA CVB / Standalone Batch Execution, I like to infer a new document using model / online web service calls.

These documents are not incredibly useful for new products and output. * 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 could not even find any sample code on the Internet or anywhere else.

Here I thought what 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 have not seen anyone trying something like this? Has anyone ever tried something like this?

Any suggestion or index would be highly appreciated.

+4
source share

Source: https://habr.com/ru/post/1493371/


All Articles