myleott / jgibblabeledlda Goto Github PK
View Code? Open in Web Editor NEWLabeled LDA in Java (based on JGibbLDA)
License: GNU General Public License v2.0
Labeled LDA in Java (based on JGibbLDA)
License: GNU General Public License v2.0
After some warning of "Unknown document label ( term ) for document doc_id."
An exception occurs:
java.lang.ArrayIndexOutOfBoundsException: 116
at jgibblda.Estimator.sampling(Estimator.java:114)
at jgibblda.Estimator.estimate(Estimator.java:66)
at jgibblda.LDA.main(LDA.java:52)
My data like:
[10] term1_1 term1_2 ...
term_2_1 term2_2 ...
according to README, i copy the example of input file ,however the result is
Unknown document label ( label_2,1 ) for document 1.
Unknown document label ( label_2,2 ) for document 1.
Unknown document label ( label_2,l_2 ) for document 1.
when i use only one line into the input,however,it can't figure out the "[",the model just think the charecter and the "[" as one word which means the model think the inputfile as unlabeled.But in the LDAcmdoption,-unlabeled is false.could you please give us a example of inputfile ,so i can know what's wrong with our inputfile?
I just ran Labelled LDA over a bunch of documents following the documentation, but after it got completed I am unable to locate where it has saved the model files. My initial presumption was the input directory but nothing is in there. There were no errors while training:
Dataset loaded:
M:50902
V:1931403
Sampling 100 iterations!
Iteration 100
Saving the final model!
Can you point me out where does it save the model?
Thanks for sharing the Labelled LDA solution. I tried with [news,1 tech,2], it shows warning for the unknown label. looking at the code in LDADataSet:addDoc,
try { label_set.add(Integer.parseInt(labelStr)); } catch (NumberFormatException nfe) { System.err.println("Unknown document label ( " + labelStr + " ) for document " + docs.size() + "."); }
I think the reason is that, 'Integer.parseInt(labelStr)' always fails for the label formate label_1,int
.
Hi,
I am trying to learn LDA. Referrering to you code. But cant fine the input files
Can you pls put the sample input and other required files to run this example in some folder
Hi there,
I'm trying to use your code, but running into problems. After cloning the repo, I try to compile the code, but it issues errors. When I do:
$ javac -cp lib/args4j-2.0.6.jar:lib/trove-3.0.3.jar src/jgibblda/Estimator.java
I get
src/jgibblda/Estimator.java:37: error: cannot find symbol
protected Model trnModel;
^
symbol: class Model
location: class Estimator
src/jgibblda/Estimator.java:38: error: cannot find symbol
LDACmdOption option;
^
symbol: class LDACmdOption
location: class Estimator
src/jgibblda/Estimator.java:40: error: cannot find symbol
public Estimator(LDACmdOption option) throws FileNotFoundException, IOException
^
symbol: class LDACmdOption
location: class Estimator
src/jgibblda/Estimator.java:44: error: cannot find symbol
trnModel = new Model(option);
^
symbol: class Model
location: class Estimator
src/jgibblda/Estimator.java:46: error: illegal start of type
if (option.est){
^
src/jgibblda/Estimator.java:49: error: illegal start of type
else if (option.estc){
^
6 errors
I rarely use java, but my instinct tells me this is because of the code being written for a different versio of Java. I'm using 1.8.0_131. What is the intended version, or, how do I solve this. Thanks in advance!
can current algorithm produce a label for unlabelled documents?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.