Examples of topicDistribution()


Examples of cc.mallet.topics.HDP.topicDistribution()

   
    //set number of iterations, and display result or not
    hdp.estimate(2000);
   
    //get topic distribution for first instance
    double[] distr = hdp.topicDistribution(0);
    //print out
    for(int j=0; j<distr.length ; j++){
      System.out.print(distr[j] + " ");
    }
   
View Full Code Here

Examples of cc.mallet.topics.HDPInferencer.topicDistribution()

    //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
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.