Skip to content

Commit

Permalink
ant
Browse files Browse the repository at this point in the history
  • Loading branch information
Kling, Christoph committed Aug 3, 2016
1 parent 57de85c commit 1d2e173
Show file tree
Hide file tree
Showing 42 changed files with 13 additions and 35 deletions.
Binary file added TopicModel.jar
Binary file not shown.
Binary file added bin/ckling/inference/PracticalInference.class
Binary file not shown.
Binary file added bin/ckling/inference/TopicModel$1.class
Binary file not shown.
Binary file added bin/ckling/inference/TopicModel$2.class
Binary file not shown.
Binary file added bin/ckling/inference/TopicModel$3.class
Binary file not shown.
Binary file added bin/ckling/inference/TopicModel$4.class
Binary file not shown.
Binary file added bin/ckling/inference/TopicModel.class
Binary file not shown.
Binary file added bin/org/knowceans/corpus/Dictionary.class
Binary file not shown.
Binary file added bin/org/knowceans/corpus/Document.class
Binary file not shown.
Binary file added bin/org/knowceans/corpus/ICorpus.class
Binary file not shown.
Binary file added bin/org/knowceans/corpus/ILabelCorpus.class
Binary file not shown.
Binary file added bin/org/knowceans/corpus/ISplitCorpus.class
Binary file not shown.
Binary file added bin/org/knowceans/corpus/ITermCorpus.class
Binary file not shown.
Binary file added bin/org/knowceans/util/ArmSampler$Envelope.class
Binary file not shown.
Binary file added bin/org/knowceans/util/ArmSampler$Metropolis.class
Binary file not shown.
Binary file added bin/org/knowceans/util/ArmSampler$Point.class
Binary file not shown.
Binary file added bin/org/knowceans/util/ArmSampler.class
Binary file not shown.
Binary file added bin/org/knowceans/util/ArrayIo.class
Binary file not shown.
Binary file added bin/org/knowceans/util/ArrayUtils.class
Binary file not shown.
Binary file added bin/org/knowceans/util/CokusRandom.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added bin/org/knowceans/util/DirichletEstimation.class
Binary file not shown.
Binary file added bin/org/knowceans/util/DoubleFormat.class
Binary file not shown.
Binary file added bin/org/knowceans/util/ExpDouble.class
Binary file not shown.
Binary file added bin/org/knowceans/util/Gamma.class
Binary file not shown.
Binary file added bin/org/knowceans/util/IndexQuickSort$1.class
Binary file not shown.
Binary file added bin/org/knowceans/util/IndexQuickSort$2.class
Binary file not shown.
Binary file added bin/org/knowceans/util/IndexQuickSort.class
Binary file not shown.
Binary file added bin/org/knowceans/util/MayaShades.class
Binary file not shown.
Binary file added bin/org/knowceans/util/Pair.class
Binary file not shown.
Binary file added bin/org/knowceans/util/ParallelFor$1.class
Binary file not shown.
Binary file added bin/org/knowceans/util/ParallelFor$Worker.class
Binary file not shown.
Binary file added bin/org/knowceans/util/ParallelFor.class
Binary file not shown.
Binary file added bin/org/knowceans/util/RandomSamplers$CrpData.class
Binary file not shown.
Binary file added bin/org/knowceans/util/RandomSamplers.class
Binary file not shown.
Binary file added bin/org/knowceans/util/StopWatch.class
Binary file not shown.
Binary file added bin/org/knowceans/util/Vectors.class
Binary file not shown.
12 changes: 1 addition & 11 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,9 @@
</javac>
</target>
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
<target name="Start">
<java classname="ckling.inference.Start" failonerror="true" fork="yes">
<classpath refid="hmdp.classpath"/>
</java>
</target>
<target name="TopicModel (1)">
<target name="HMDP">
<java classname="ckling.inference.TopicModel" failonerror="true" fork="yes">
<classpath refid="hmdp.classpath"/>
</java>
</target>
<target name="TransformData">
<java classname="ckling.tools.TransformData" failonerror="true" fork="yes">
<classpath refid="hmdp.classpath"/>
</java>
</target>
</project>
22 changes: 5 additions & 17 deletions src/ckling/inference/PracticalInference.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public class PracticalInference {

public static void main2 (String[] args) {

CopyOfPracticalInference pi = new CopyOfPracticalInference();
PracticalInference pi = new PracticalInference();



Expand All @@ -280,7 +280,7 @@ public static void main2 (String[] args) {
pi.readDict();

System.out.println("Initialising parameters...");
pi.getParameters();
pi.initParameters();

System.out.println("Processing documents...");

Expand Down Expand Up @@ -336,7 +336,7 @@ public void initialise () {
System.out.println("Reading settings...");
readSettings();
readDict();
getParameters();
initParameters();
System.out.println("Processing documents...");
readDocs();
System.out.println("Estimating topics...");
Expand Down Expand Up @@ -652,7 +652,7 @@ public void readGroups() {
}

//set Parameters
public void getParameters() {
public void initParameters() {
readFfromTextfile();
System.out.println("Reading groups...");

Expand Down Expand Up @@ -713,23 +713,12 @@ public void getParameters() {

for (int t=0; t < V; t++) {
for (int k=0;k<T;k++) {
// //Random assignments of words to topics
// double[] multrand = new double[T];
// double rest = 1.0;
// for (int k2=0;k2<T-1;k2++) {
// double rand = Math.random();
// multrand[k2]= rand * rest;
// rest *= (1.0-rand);
// }
// multrand[T-1] = rest;
// nkt[k][t] = wordfreq[t] * multrand[k];

nkt[k][t]= Math.random()*INIT_RAND;

//nkt[k][t] = (Double.valueOf(C)/V * 1.0/ Double.valueOf(T)) * 0.9 + 0.1 * (0.5-Math.random()) * C/Double.valueOf(T);
nk[k]+=nkt[k][t];

tempmkt[k][t] = 0.0;

}
}
pi_0 = new double[T];
Expand Down Expand Up @@ -766,7 +755,6 @@ public void getParameters() {
}


//sumqfgc = new double[F][];
sumqf = new double[F];

featureprior = new double[F];
Expand Down
14 changes: 7 additions & 7 deletions src/ckling/inference/TopicModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public static void food8ppx() {
pi.readDict();

System.out.println("Initialising parameters...");
pi.getParameters();
pi.initParameters();

System.out.println("Processing documents...");

Expand Down Expand Up @@ -435,7 +435,7 @@ public static void food8learnppx() {
pi.readDict();

System.out.println("Initialising parameters...");
pi.getParameters();
pi.initParameters();

System.out.println("Processing documents...");

Expand Down Expand Up @@ -629,7 +629,7 @@ public static void kappaporn() {
pi.readDict();

System.out.println("Initialising parameters...");
pi.getParameters();
pi.initParameters();

System.out.println("Processing documents...");

Expand Down Expand Up @@ -717,7 +717,7 @@ public static void burninfood() {
pi.readDict();

System.out.println("Initialising parameters...");
pi.getParameters();
pi.initParameters();

System.out.println("Processing documents...");

Expand Down Expand Up @@ -800,7 +800,7 @@ public static void burninporn() {
pi.readDict();

System.out.println("Initialising parameters...");
pi.getParameters();
pi.initParameters();

System.out.println("Processing documents...");

Expand Down Expand Up @@ -886,7 +886,7 @@ public static void ppxpornNolink(String ds, int K, int bs) {
pi.readDict();

System.out.println("Initialising parameters...");
pi.getParameters();
pi.initParameters();

System.out.println("Processing documents...");

Expand Down Expand Up @@ -965,7 +965,7 @@ public static void ppxporn3() {
pi.readDict();

System.out.println("Initialising parameters...");
pi.getParameters();
pi.initParameters();

System.out.println("Processing documents...");

Expand Down
Empty file modified src/org/knowceans/util/RandomSamplers.java
100755 → 100644
Empty file.

0 comments on commit 1d2e173

Please sign in to comment.