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

Saving gsdmm model #14

Open
Jedevold opened this issue Mar 23, 2022 · 3 comments
Open

Saving gsdmm model #14

Jedevold opened this issue Mar 23, 2022 · 3 comments

Comments

@Jedevold
Copy link

Once the model is trained, how do I save it for future classification?

@dtemkin
Copy link

dtemkin commented May 7, 2022

It hasn't been merged yet, but you can try my branch. I added a save() and load() function.

@jonathan-chin
Copy link

@dtemkin I think I'm using these new functions correctly but when trying to load a saved model, I get the following error:

TypeError: MovieGroupProcess._from_data() missing 1 required positional argument: 'vocab_size'

any ideas? (also, thanks for adding these functions!)

@jonathan-chin
Copy link

@dtemkin I figured it out. your save() function is missing a parameter. it should read:

payload = {"K": self.K, "alpha":self.alpha, 'beta': self.beta, "D": self.number_docs, 'vocab_size': self.vocab_size, 'cluster_doc_count': self.cluster_doc_count,
                   "cluster_word_count": self.cluster_word_count,
                   "cluster_word_distribution": self.cluster_word_distribution,
                   "n_iters": self.n_iters}

notice the addition of vocab_size after D and before cluster_doc_count

deamonpog added a commit to deamonpog/gsdmm that referenced this issue Dec 7, 2023
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

3 participants