this.printState(new File(stateFilename + '.' + iterationsSoFar + ".gz"));
public static void main (String[] args) throws IOException { InstanceList training = InstanceList.load (new File(args[0])); int numTopics = args.length > 1 ? Integer.parseInt(args[1]) : 200; InstanceList testing = args.length > 2 ? InstanceList.load (new File(args[2])) : null; DMRTopicModel lda = new DMRTopicModel (numTopics); lda.setOptimizeInterval(100); lda.setTopicDisplay(100, 10); lda.addInstances(training); lda.estimate(); lda.writeParameters(new File("dmr.parameters")); lda.printState(new File("dmr.state.gz")); } }
public static void main (String[] args) throws IOException { InstanceList training = InstanceList.load (new File(args[0])); int numTopics = args.length > 1 ? Integer.parseInt(args[1]) : 200; InstanceList testing = args.length > 2 ? InstanceList.load (new File(args[2])) : null; DMRTopicModel lda = new DMRTopicModel (numTopics); lda.setOptimizeInterval(100); lda.setTopicDisplay(100, 10); lda.addInstances(training); lda.estimate(); lda.writeParameters(new File("dmr.parameters")); lda.printState(new File("dmr.state.gz")); } }
this.printState(new File(stateFilename + '.' + iterationsSoFar + ".gz"));
this.printState(new File(stateFilename + '.' + iterationsSoFar + ".gz"));
public static void main (String[] args) throws IOException { InstanceList training = InstanceList.load (new File(args[0])); int numTopics = args.length > 1 ? Integer.parseInt(args[1]) : 200; InstanceList testing = args.length > 2 ? InstanceList.load (new File(args[2])) : null; DMRTopicModel lda = new DMRTopicModel (numTopics); lda.setOptimizeInterval(100); lda.setTopicDisplay(100, 10); lda.addInstances(training); lda.estimate(); lda.writeParameters(new File("dmr.parameters")); lda.printState(new File("dmr.state.gz")); } }