In a workbook in a chapter about computing IDF I noticed that a text is saying "Loop over each word 𝑤 and compute df𝑤, the number of times this word appears in each document in the corpus".
It actually means (at least to me) a little bit different thing than what was actually said in Lesson 4 part 3 on the topic. Which is why it very quickly leads to a straightforward and wrong implementation of get_idf function (same algorithm as presented in get_idf_wrong function).
So if students do no remember exactly what Lesson 4 said about computing IDF, it is very easy to make a mistake and implement a wrong algorithm.
I suggest to replace this particular sentence (quoted above) in a workbook with some other sentence, explaining that we actually need to count the number of documents, where the word appears ()or rephrase existing sentence in a simpler and unambiguous form).
Hello!
In a workbook in a chapter about computing IDF I noticed that a text is saying "Loop over each word 𝑤 and compute df𝑤, the number of times this word appears in each document in the corpus".
It actually means (at least to me) a little bit different thing than what was actually said in Lesson 4 part 3 on the topic. Which is why it very quickly leads to a straightforward and wrong implementation of get_idf function (same algorithm as presented in get_idf_wrong function).
So if students do no remember exactly what Lesson 4 said about computing IDF, it is very easy to make a mistake and implement a wrong algorithm.
I suggest to replace this particular sentence (quoted above) in a workbook with some other sentence, explaining that we actually need to count the number of documents, where the word appears ()or rephrase existing sentence in a simpler and unambiguous form).