2
$\begingroup$

Can I use doc2vec for classification big documents (500-2000 words, 20000 total documents, classication for three classes)? Is it a problem that the documents are large enough and contain many common words? Can I train my data together with Wikipedia articles (using unique tag for every article) for a more accurate calculation word-embedings, or it can't give positive effect?

$\endgroup$

2 Answers 2

2
$\begingroup$

Can I use doc2vec for classification big documents (500-2000 words, 20000 total documents, classification for three classes)?

Yes. This amount of documents is considered small to medium. It is worth noting that the original Doc2Vec paper experimented with 75K documents.

Is it a problem that the documents are large enough and contain many common words?

No, it is OK. Consider the fact that both common and distinctive words are increasing with the size of documents, and distinctive words are what that matters. That is, larger texts are easier to distinguish.

Can I train my data together with Wikipedia articles (using unique tag for every article) for a more accurate calculation word-embeddings, or it can't give positive effect?

It depends and is worth the try. If Wikipedia documents are close in format and content to your documents, they could definitely help. In the Doc2Vec paper, authors used 25K labeled documents (IMDb reviews with positive and negative labels) and 50K unlabeled ones for training.

Also, this is a nice tutorial on using doc2vec. It reports 1-2 hours for 100K documents.

$\endgroup$
0
$\begingroup$

It's fine for you to use doc2vec on 20K documents(500-2000 words). However, make sure you have done proper prep-processing of text documents before you start. It might require significant parameter-tuning and iterations to train the model. Assuming you have enough computational resources, I don't see any problem trying out.

$\endgroup$
2
  • $\begingroup$ Thx! Could you tell more about tuning of the parameters? $\endgroup$
    – r1d1
    Commented Mar 13, 2019 at 11:39
  • $\begingroup$ For tuning, first comeup with a way to evaluate the output of a training session (example: desired document-pairs that should be closer to each other than others). Then perform a grid search to come up with best ones. In your case with large number of documents, you may find that quite-small window and negative values may perform better. $\endgroup$
    – Srini
    Commented Mar 13, 2019 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.