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

Fix Mallet wrapper & test for HDPTransform #1555

Merged
merged 8 commits into from
Sep 1, 2017
Merged

Conversation

menshikh-iv
Copy link
Contributor

No description provided.

@@ -183,7 +183,7 @@ def __getitem__(self, bow, iterations=100):

def load_word_topics(self):
logger.info("loading assigned topics from %s", self.fstate())
word_topics = numpy.zeros((self.num_topics, self.num_terms), dtype=numpy.float32)
word_topics = numpy.zeros((self.num_topics, self.num_terms), dtype=numpy.float64)
Copy link
Owner

@piskvorky piskvorky Aug 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed? Double precision is rarely necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double precision used for all TMs now.

Copy link
Owner

@piskvorky piskvorky Aug 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question is "why"? Looks wasteful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, I don't implement TMs in gensim.

Copy link
Owner

@piskvorky piskvorky Sep 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't sound right. I'm pretty sure many models used to use single precision (RP and LSI, for sure).

Can you check when the change to double precision happened, and why?

@menshikh-iv menshikh-iv merged commit 9caf055 into develop Sep 1, 2017
@piskvorky piskvorky deleted the fix-mallet-and-hdp branch September 1, 2017 15:43
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

Successfully merging this pull request may close these issues.

2 participants