コード例 #1
0
ファイル: Pipeline.java プロジェクト: mindis/TagRec
 // Helpers
 // -----------------------------------------------------------------------------------------------------------------------------------------------------------
 private static void createLdaSamples(
     String sampleName, int size, int topics, boolean tagrec, boolean personalizedTopicCreation) {
   getTrainTestSize(sampleName);
   for (int i = 1; i <= size; i++) {
     MalletCalculator.createSample(
         sampleName, (short) topics, tagrec, TRAIN_SIZE, personalizedTopicCreation);
   }
 }
コード例 #2
0
ファイル: Pipeline.java プロジェクト: mindis/TagRec
 private static void startLdaCalculator(
     String sampleDir, String sampleName, int topics, int sampleCount, boolean all) {
   getTrainTestSize(sampleName);
   BookmarkReader reader = null;
   for (int i = 1; i <= sampleCount; i++) {
     reader = MalletCalculator.predictSample(sampleName, TRAIN_SIZE, TEST_SIZE, topics, true, all);
   }
   writeMetrics(sampleDir, sampleName, "lda_" + topics, sampleCount, 10, null, reader, null);
 }