TFIDF calculating confusion

后端 未结 2 476
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-04 15:47

I found the following code on the internet for calculating TFIDF:

https://github.com/timtrueman/tf-idf/blob/master/tf-idf.py

I added \"1+\" in

2条回答
  •  盖世英雄少女心
    2021-02-04 16:19

    1. No. Tf-idf is tf, a non-negative value, times idf, a non-negative value, so it can never be negative. This code seems to be implementing the erroneous definition of tf-idf that's been on the Wikipedia for years (it's been fixed in the meantime).

提交回复
热议问题