I am working on Assignment: Vector Space Models for the course Natural Language Processing with Classification and Vector Spaces. (Week 3) C1_W3_Assignment.ipynb
My solutions all pass the unit tests but the submission keeps getting error.
Test_get_country and Test get_accuracy two functions does not pass the submission. first 2 (test cosine similarity and test euclidian) and last one (test compute pca) passes the submission.
I have reloaded and worked on fresh copy of the notebook and tried all the possible restart and reboot option.
Any help will be highly appreciated.
My guess is that you are making the most common error on this function by directly referencing the global variable word_embeddings
from the local scope of the get_country
function. You should be using the formal parameter embeddings
. What if the grader passes a different dictionary?
Thank you Paul (@paulinpaloalto). I was able to solve the problem with you suggestion.
thank you so much. yes, the same mistake i too have done.
I am facing issue with exercise 3 and 4. While the answers are correct, submitting to answers fails it.
Exercise 3:
My Output: (‘Egypt’, 0.7626822)
Expected Output: (Approximately)
(‘Egypt’, 0.7626821)
Exercise 4 :
My Output: Accuracy is 0.92
Expected Output:
≈≈ 0.92
Can anyone help please