udacity / aitnd-issues

Repo for AITND issues/bug reports from students.
64 stars 0 forks source link

Term 2: Lesson 6 part 6: misleading guidance on computing IDF #90

Closed jevgenitolstouhhov closed 5 years ago

jevgenitolstouhhov commented 5 years ago

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).

e7dud7e commented 5 years ago

Thanks for catching this Jevgeni! We've updated the notebook instructions to reflect your correction.