UNQ_C10: I have trouble understanding the concept

Hello, future help mates :slight_smile:

I was glad that I could solve most of these problems for this week’s assignment w/ ease and Jonas has been really helpful getting me here.

However, I have trouble understanding the concept of the get_corrections function.

  • We’re asked to find n amount of words with highest probabilities, which means words with the highest C_w / m, but we are working with sets here, so every value is unique (they all return the count of 1 over certain m).

  • I have tried using the .intersection method, which was really clean, but didn’t help me arrive to the expected probabilities.

  • I have tried turning them into lists and incrementing all of them (edit1, edit2, and vocab) to get recursive instances, hoping to get the expected values but no dice.

I think I’m totally missing something really simple here, can anyone remind me what that is? it feels like I’m getting close but not really at all :smiling_face_with_tear:.

I hope this forum would be of great help to others struggling on this question as well.


I totally missed the parameters probs that was passed in from the dataset earlier and got confused with the vocab above. It was so easy all along!