# Doc2vec for text classification task

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?

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.

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.

• Thx! Could you tell more about tuning of the parameters?
– r1d1
Mar 13, 2019 at 11:39
• 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. Mar 13, 2019 at 11:48