# How to improve the accuracy of a Doc2Vec model (Gensim) in case of a toy-sized data set?

I'm building an NLP question-answering application using Doc2Vec technique in gensim package of Python. My training questions is very small, only 20 documents and I am getting very inaccurate and different similarities even for same document while running at multiple instances. Almost all the sources which I referred trained data set containing thousands of documents. So I infer the reason behind my model's inaccuracy is the size of my data set.

Is there any way to improve the similarity between documents, maybe by changing parameters or feature engineering? If yes, what are those parameters and by what ratio should I change them? If no, what are other ways or perhaps other neural network models to tackle the problem?

• Try using pretrained embeddings. – Emre Jun 28 '17 at 5:30
• a dataset of 20 documents is never going to work in any machine learning scenario. So, however you tweak the parameters, it will not work. as @Emre suggested go with pretrained ones or train a standard huge dataset and retrain the model further with those 20 docs you have. – yazhi Jul 28 '17 at 13:27
• Thanks a lot. I have created my own training set with 700+ questions and training it over GoogleNewsVector. It gives excellent results without having to tweak any parameters. – Kshitiz Jul 28 '17 at 18:02
• @ahamsiva what if each of the docs is a few GBs big? It's a mistake to think that small # docs implies small number of examples – gokul_uf Jul 28 '17 at 23:47
• @gokul_uf Thats true. But 20 documents mean 20 samples, however big it maybe. and only with the number of samples a ML algorithm could learn, doesnt matter how huge each sample is. how about training set of 10 cat pictures and 10 dog pictures with 4k resolution or 100000 cat and dog pictures with 240p resolution. you know what will work right. – yazhi Jul 30 '17 at 20:09