Cosine similarity and tf-idf

前端 未结 6 1039
梦毁少年i
梦毁少年i 2020-12-07 17:14

I am confused by the following comment about TF-IDF and Cosine Similarity.

I was reading up on both and then on wiki under Cosine

6条回答
  •  执笔经年
    2020-12-07 17:38

    The complete mathematical procedure for cosine similarity is explained in these tutorials

    • part-I
    • part-II
    • part-III

    Suppose if you want to calculate cosine similarity between two documents, first step will be to calculate the tf-idf vectors of the two documents. and then find the dot product of these two vectors. Those tutorials will help you :)

提交回复
热议问题