Katkat

Identify Pirate Themes Using Similarity Score Algorithm

ShopifyData Scientist · Technical Screen

Last updated

This question evaluates understanding of similarity scoring, set-based comparison of structured records, and practical data deduplication techniques commonly used in data science.

Scenario

Engineering wants an automated way to spot custom themes that are probably just pirate themes in disguise.

Question

Write Python that takes two lists (A and B) and returns their similarity score defined as len(intersection) / len(union). Given pirate_themes (list of dicts) and custom_themes (list of dicts), identify which custom themes are likely pirates using the similarity score and explain your threshold choice.

Hints

Implement a Jaccard similarity; iterate over dictionaries by a chosen key set; threshold of 0.5 is typical.