public static void main (String[] args) throws IOException { InstanceList ilist = InstanceList.load (new File(args[0])); int numIterations = args.length > 1 ? Integer.parseInt(args[1]) : 1000; int numTopWords = args.length > 2 ? Integer.parseInt(args[2]) : 20; int numSuperTopics = args.length > 3 ? Integer.parseInt(args[3]) : 10; int numSubTopics = args.length > 4 ? Integer.parseInt(args[4]) : 10; System.out.println ("Data loaded."); PAM4L pam = new PAM4L (numSuperTopics, numSubTopics); pam.estimate (ilist, numIterations, 50, 0, 50, null, new Randoms()); // should be 1100 pam.printTopWords (numTopWords, true); // pam.printDocumentTopics (new File(args[0]+".pam")); }
public static void main (String[] args) throws IOException { InstanceList ilist = InstanceList.load (new File(args[0])); int numIterations = args.length > 1 ? Integer.parseInt(args[1]) : 1000; int numTopWords = args.length > 2 ? Integer.parseInt(args[2]) : 20; int numSuperTopics = args.length > 3 ? Integer.parseInt(args[3]) : 10; int numSubTopics = args.length > 4 ? Integer.parseInt(args[4]) : 10; System.out.println ("Data loaded."); PAM4L pam = new PAM4L (numSuperTopics, numSubTopics); pam.estimate (ilist, numIterations, 50, 0, 50, null, new Randoms()); // should be 1100 pam.printTopWords (numTopWords, true); // pam.printDocumentTopics (new File(args[0]+".pam")); }
public static void main (String[] args) throws IOException { InstanceList ilist = InstanceList.load (new File(args[0])); int numIterations = args.length > 1 ? Integer.parseInt(args[1]) : 1000; int numTopWords = args.length > 2 ? Integer.parseInt(args[2]) : 20; int numSuperTopics = args.length > 3 ? Integer.parseInt(args[3]) : 10; int numSubTopics = args.length > 4 ? Integer.parseInt(args[4]) : 10; System.out.println ("Data loaded."); PAM4L pam = new PAM4L (numSuperTopics, numSubTopics); pam.estimate (ilist, numIterations, 50, 0, 50, null, new Randoms()); // should be 1100 pam.printTopWords (numTopWords, true); // pam.printDocumentTopics (new File(args[0]+".pam")); }
if (showTopicsInterval != 0 && iterations % showTopicsInterval == 0) { System.out.println (); printTopWords (5, false);
if (showTopicsInterval != 0 && iterations % showTopicsInterval == 0) { System.out.println (); printTopWords (5, false);
if (showTopicsInterval != 0 && iterations % showTopicsInterval == 0) { System.out.println (); printTopWords (5, false);
outputModelInterval.value, outputModelFilename.value, randomSeed.value == 0 ? new Randoms() : new Randoms(randomSeed.value)); pam.printTopWords(topWords.value, true); if (stateFile.value != null) pam.printState (new File(stateFile.value));
outputModelInterval.value, outputModelFilename.value, randomSeed.value == 0 ? new Randoms() : new Randoms(randomSeed.value)); pam.printTopWords(topWords.value, true); if (stateFile.value != null) pam.printState (new File(stateFile.value));
outputModelInterval.value, outputModelFilename.value, randomSeed.value == 0 ? new Randoms() : new Randoms(randomSeed.value)); pam.printTopWords(topWords.value, true); if (stateFile.value != null) pam.printState (new File(stateFile.value));