Deep-ML is a free, open-source machine learning challenge platform. Practice ML coding problems, work with real datasets in labs, and learn through interactive articles.
Please enable JavaScript to use the full platform.
Write similarity(search, doc): how well a document matches a search. Higher means more similar. Both are word counts over [cat, dog, fish], so catcatfish is [2, 0, 1].
similarity(search, doc)
[cat, dog, fish]
[2, 0, 1]