Bag-of-words
1 bag-of-words
1.1 从one-hot讲起
I: [1, 0, 0]
love: [0, 1, 0]
you: [0, 0, 1]1.2 tf-idf
TF(t) = frequency of t in document / total words in document
IDF(t) = log(total documents / number of documents with term t in it + 1)
TF-IDF(t) = TF(t) * IDF(t)Last updated