When I follow the document of JgibbLDA.
I can not generate any output from that.
My Operating system is Ubuntu 10.04.
And type command just follow the document, that is (From scratch):
$ java -mx512M -cp bin:lib/args4j-2.0.6.jar jgibblda.LDA -est -alpha 0.5 -beta 0.1 -ntopics 100 -niters 1000 -savestep 100 -twords 20 -dfile models/casestudy/newdocs.dat
The error message occurs when saving the output to disk.
It is that:
Error while saving model tassign: null
java.lang.NullPointerException
at jgibblda.Model.saveModelTAssign(Model.java:276)
at jgibblda.Model.saveModel(Model.java:410)
at jgibblda.Estimator.estimate(Estimator.java:89)
at jgibblda.LDA.main(LDA.java:50)
I am not sure whether that is a bug.
How can I solve that?
Thanks in advance.
I'm also having the same problem!
This is the output from command line.
Iteration 999 ...
Gibbs sampling completed!
Saving the final model!
Error while saving model tassign: null
java.lang.NullPointerException
at jgibblda.Model.saveModelTAssign(Model.java:276)
at jgibblda.Model.saveModel(Model.java:410)
at jgibblda.Estimator.estimate(Estimator.java:89)
at jgibblda.LDA.main(LDA.java:50)
In the beginning I'm getting this error also
Read Dataset Error: \models\casestudy-en\newdocs.dat (The system cannot find the path specified)
java.io.FileNotFoundException: \models\casestudy-en\newdocs.dat (The system cannot find the path specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at jgibblda.LDADataset.readDataSet(LDADataset.java:154)
at jgibblda.Model.initNewModel(Model.java:476)
at jgibblda.Estimator.init(Estimator.java:45)
at jgibblda.LDA.main(LDA.java:49)
Fail to read training data!</init></init>
Sampling 1000 iteration!
Iteration 1 ...
I think the error is because the file is not reading. How to fix this error?
Last edit: Latest Tom 2015-10-27
use this:
$ java -mx512M -cp bin:lib/args4j-2.0.6.jar jgibblda.LDA -est -alpha 0.5 -beta 0.1 -ntopics 100 -niters 1000 -savestep 100 -twords 20 -dir models/casestudy-en -dfile newdocs.dat
you have to set [-dir] based on correct directory name.