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

Implementation -- write embedding matrix #1

Open
KaiWeiChang opened this issue Feb 17, 2017 · 1 comment
Open

Implementation -- write embedding matrix #1

KaiWeiChang opened this issue Feb 17, 2017 · 1 comment
Labels

Comments

@KaiWeiChang
Copy link
Contributor

  • Change pmf.cpp to write out the embedding matrix
  • Combine the embedding matrix and the vocabulary
  • check glove.cpp to see how they combine word matrix and context matrix
@KaiWeiChang
Copy link
Contributor Author

  1. generate coocurance matrix

mkdir example2
cp ???/cooccurance.txt example2/train.ratings
cp ???/cooccurance.txt example2/test.ratings
edit example2/mata
wc -l train.ratings (#lines in train.ratings = nonzero of matrix)
find max row and column values

./converter example2

./omp-pmf-train -s 11 -n 12 -f 1 -k 20 example (make sure it writes embedings)

cut -f 1 -d ' ' vocab.txt > words (give you all the words)
paste words example.model > pmf_embedding

eval ...

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

No branches or pull requests

2 participants