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

InferenceCorpus 를 거치고나면 min count 이상의 단어들의 숫자가 급격히 줄어듦 #14

Open
lovit opened this issue Dec 8, 2018 · 1 comment

Comments

@lovit
Copy link
Owner

lovit commented Dec 8, 2018

문장 전체를 학습 데이터에서 제거하기 때문에 그 문장에 포함된 다른 단어들이 모두 사라짐. word2vec train 부분에서 vocabulary 를 따로 지정할 수 있는 부분을 만들어야 함

@lovit
Copy link
Owner Author

lovit commented Dec 10, 2018

원인

inference 할 단어가 포함된 문장 자체를 학습에 이용하지 않다보니 해당 문장에 포함된 단어들 모두가 학습되지 않음. 예를 들어 A 를 inference 하려 할 때, 아래 문장에서 this, is, sentence 가 모두 counting 되지 않음.

... this is A sentence ...

여러 문장들이 제거되다보니 특정 단어들이 min_count 이하로 등장하여 학습이 되지 않음.

문제점

만약 inference 용 corpus 에서 sentence 의 빈도수가 min_count 보다 작게 등장하여 학습되지 않았다면 full_word2vec.similar_words() 의 결과에는 sentence 가 존재하지만, small_word2vec.similar_words 에는 sentence 가 없고, 이 단어는 inference 가 되지도 않음.

해결 방안 1

실험을 할 때, (word, word) context matrix 에서만 sentence 를 지운 뒤, 복원 실험을 한다.

해결 방안 2

inference 에 이용할 단어를 제외하고 full_word2vec, small_word2vec 의 학습된 단어의 종류를 동일하게 맞춘다 (full_word2vec 의 단어 중 small_word2vec 에서 학습된 단어만 이용한다.)

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

1 participant