-
Notifications
You must be signed in to change notification settings - Fork 4
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
[Ch3] QnA #5
Comments
p146에서 질문있습니다.
워드 임베딩을 할 때, SVD를 이용한 PCA를 사용하면 새로운 단어가 들어왔을 때 일괄처리를 해야되는 게 맞는데(통계기반), IPCA(Incremental PCA)로 했을 때는 위의 inc_pca = IncrementalPCA(n_components=차원수)
for mini_batch in np.array_split(X, batch_size):
inc_pca.partial_fit(mini_batch)
word_representation = inc_pca.transform(X) 요 코드에서 새로운 단어가 왔을 때 갱신하고자 한다면 inc_pca.partial_fit(new_word) 로 하면 되는건지? 궁금합니다 |
저도 이 부분에 대해서는 조금 더 확인이 필요하지만, 제가 이해하기로는 word2vec과 같은 신경망 학습과 IPCA는 같은 장점을 공유하지만 일맥상통한다고 보기는 어려울 것 같습니다. 추론 기반 word2vec은 말씀하신대로 가중치를 갱신하는 방식을 기본으로 하고, IPCA는 실제로 sklearn 코드를 보면 fit() 함수 내에서도 전체 batch를 mini_batch_size로 잘라서 partial_fit()을 반복 호출 하고 있습니다. 이 방식을 최초로 제안한 논문을 못 찾아서 sklearn 코드를 보면서 추측한거라 확실할지는 모르겠네요.^^; |
After training a scikit-learn model, it is desirable to have a way to persist the model for future use without having to retrain. |
No description provided.
The text was updated successfully, but these errors were encountered: