5
$\begingroup$

I'm currently working in text mining ptoject I'd like to know once I'm on vectorisation. With method is better.

  • Is it Word2Vec or Tf-Idf ?

  • Here I see we can combine them why that? Does it improve quality of data?

  • What about GloVe?

Thanks

$\endgroup$

1 Answer 1

3
$\begingroup$
  • Word2Vec algorithms (Skip Gram and CBOW) treat each word equally, because their goal to compute word embeddings. The distinction becomes important when one needs to work with sentences or document embeddings; not all words equally represent the meaning of a particular sentence. And here different weighting strategies are applied, TF-IDF is one of those successful strategies.
  • At times, it does improve quality of inference, so combination is worth a shot.
  • Glove is a Stanford baby, which has often proved to perform better. Can read more about Glove against Word2Vec here, among many other resources available online.
$\endgroup$
2
  • $\begingroup$ when combining them I've to perfomr Wrd2vec then tf-idf? I do not know how that should word the output of word2vecis numeric matrix, how tf-idf should handle that?? $\endgroup$
    – abdoulsn
    Commented Jan 30, 2020 at 13:48
  • 1
    $\begingroup$ Create a matrix of feature first! Can use Sklearn tfidfvectorizer (scikit-learn.org/stable/modules/generated/…). Here is an example on Kaggle kernel (just googled): kaggle.com/reiinakano/… $\endgroup$ Commented Jan 30, 2020 at 13:55

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.