Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

totalNumberOfWords #2

Open
patrickjae opened this issue May 4, 2011 · 1 comment
Open

totalNumberOfWords #2

patrickjae opened this issue May 4, 2011 · 1 comment
Assignees

Comments

@patrickjae
Copy link

In mallet branch, HDPGibbsSampler line 71-73
simply adding the length of data to totalNumberOfWords should be faster than traversing an index and adding one each time, especially for very large documents
might look like this:

totalNumberOfWords += ((FeatureSequence) corpus.get(d).getData()).getLength();

@ghost ghost assigned arnim May 4, 2011
@arnim
Copy link
Owner

arnim commented May 4, 2011

THX - U R right.
Will refactor these lines anyway ;)
However; adding data to the sampler is not the place where a huge proportion of computation is spent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants