for(int j=0; j<distr.length ; j++){
System.out.print(distr[j] + " ");
}
//for inferencer
HDPInferencer inferencer = hdp.getInferencer();
inferencer.setInstance(testInstances);
inferencer.estimate(100);
//get topic distribution for first test instance
distr = inferencer.topicDistribution(0);
//print out
for(int j=0; j<distr.length ; j++){
System.out.print(distr[j] + " ");
}
//get preplexity
double prep = inferencer.getPreplexity();
System.out.println("preplexity for the test set=" + prep);
//10-folds cross validation, with 1000 iteration for each test.
hdp.runCrossValidation(10, 1000);