在过去的几个小时里,我一直在尝试让 CVB0Driver 正常工作,经过多次反复试验,我遇到了以下我无法弄清楚的错误。(使用 mahout-integration 0.7)
java.lang.Error: Unresolved compilation problem:
at org.apache.mahout.math.function.Functions.mult(Functions.java:770)
at org.apache.mahout.clustering.lda.cvb.TopicModel.<init>(TopicModel.java:139)
at org.apache.mahout.clustering.lda.cvb.TopicModel.<init>(TopicModel.java:113)
at org.apache.mahout.clustering.lda.cvb.TopicModel.<init>(TopicModel.java:108)
at org.apache.mahout.clustering.lda.cvb.TopicModel.<init>(TopicModel.java:92)
at org.apache.mahout.clustering.lda.cvb.CachingCVB0Mapper.setup(CachingCVB0Mapper.java:103)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:142)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
这是我正在使用的代码,因为我还没有让它工作我不确定我是否走在正确的道路上,所以如果你看到我犯的错误,请随时发表评论。
String [] args = {"-c","UTF-8","-i",input,"-o",output};
//create the seq file from the directory of text documents
ToolRunner.run(new SequenceFilesFromDirectory(),args);
//tokenize the documents
DocumentProcessor.tokenizeDocuments(new Path(inputDir), analyzer.getClass().asSubclass(Analyzer.class), tokenizedPath, conf);
//create tf vectors
DictionaryVectorizer.createTermFrequencyVectors(tokenizedPath,new Path(outputDir), DictionaryVectorizer.DOCUMENT_VECTOR_OUTPUT_FOLDER, conf, minSupport, maxNGramSize, minLLRValue, -1.0f, true, reduceTasks, chunkSize, sequentialAccessOutput, true);
//calculate the document frequencies
Pair<Long[], List<Path>> dfData = TFIDFConverter.calculateDF( new Path(outputDir, DictionaryVectorizer.DOCUMENT_VECTOR_OUTPUT_FOLDER), new Path(outputDir), conf, chunkSize);
//create tfidf vectors
TFIDFConverter.processTfIdf( new Path(outputDir , DictionaryVectorizer.DOCUMENT_VECTOR_OUTPUT_FOLDER), new Path(outputDir), conf, dfData, minDf, maxDFPercent, norm, true, sequentialAccessOutput, true, reduceTasks);
args = new String[]{"-i","tfidf-vectors/part-r-00000","-o","cvb"};
//create the matrix for cvb
RowIdJob.main(args);
CVB0Driver.run(conf, new Path("cvb/matrix"), mto, numTopics, numTerms, alpha, eta, maxIterations, iterationBlockSize, convergenceDelta, dictionaryPath, dto, msto, randomSeed, testFraction, numTrainThreads, numUpdateThreads, maxItersPerDoc, numReduceTasks, backfillPerplexity);
任何帮助将非常感激。