Hi,
my w3_unittest.test_cosine_similarity(cosine_similarity) passed all tests. And I got the expected output for king & queen.
Output:
0.6510956647989061
Expected Output :
≈≈ 0.651095
But I am getting errors for this w3_unittest.test_get_country(get_country). All the similarities are wrong. How is that possible if the cosine similarity passed the tests?
Wrong output word.
Expected: Egypt.
Got: Tunis.
Wrong output similarity. Maybe you should check your cosine_similarity implementation.
Expected: 0.7626821.
Got: 0.5291996936511493.
Wrong output similarity. Maybe you should check your cosine_similarity implementation.
Expected: 0.5611889.
Got: 0.5177736483102966.
Wrong output word.
Expected: Indonesia.
Got: Bangkok.
Wrong output similarity. Maybe you should check your cosine_similarity implementation.
Expected: 0.6782036.
Got: 0.5991033866658644.
Thanks,
David