0
$\begingroup$

I have been using pre-trained models such as google news or Glove 6B model but many words in my text data does not have their vectors representation in those pre trained model. So I was thinking of maybe train my own model with the data I have.

Is there any disadvantages in training our own model for two class classification model? or Should I keep using pre-trained model. What is the difference between training our own model or using pre-trained model.

# This is how I am thinking to train the model 
from gensim.models import Word2Vec   
w2v_model=Word2Vec(list_of_sentance_train,min_count=5,size=50, workers=4)
$\endgroup$

1 Answer 1

1
$\begingroup$

Usually, I would test my models in both scenarios: with pre-trained word embeddings (GloVe, Word2Vec, etc.) and with my own text, giving that I have a reasonably large data set.

The difference will be that the pre-trained models are more general in context. They are trained with really large data sets, thus capturing information and relationships (semantic, syntax) in a more generic way. The famous example of Mikolov's paper where linear combinations of two words such as city and Paris gives a result near to France in a high dimensional vector. In your own data set, you might capture some different relationships, as an example I could think in a situation where Paris is a character name (I am giving an extreme example for sake of clarity, hope it workds) and then it will be closer to other characters in the embeddings, etc.

To conclude, I have read some papers where word embeddings from specific events (in this case was disaster management) did not work better than the general ones for topic classification. I have tried myself with the same task in a large Portuguese data set and the results were better with my own embeddings (Actually, SVM beats all Deep Learning algorithms in this case) and worked better. Maybe someone with more expertise can give a more detailed answer, but my advice is: try with both.

$\endgroup$
2
  • $\begingroup$ You mentioned reasonably large dataset? I currently have around 200k observation. How many observations should be considered large in this context? $\endgroup$
    – Jeeth
    Mar 7, 2019 at 12:35
  • $\begingroup$ It is Ok then. I was just checking to see you did not have 500 rows with small peices of text only, I don't know. $\endgroup$ Mar 7, 2019 at 12:38

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.