A recommender can score beautifully on accuracy while only ever recommending the same two hundred items. Everything else in the catalogue is invisible — never shown, so never clicked, so never learned about. Catalog coverage measures that directly.
Task: write coverage(recommendations, catalog) returning that fraction, rounded to 4 decimal places.
recommendations is a list of lists — one recommendation list per user.What makes this worth measuring is that it's in genuine tension with accuracy. The safest way to be accurate is to recommend popular things, and the safest way to get coverage is to spread recommendations thin — so optimising either alone gives you a system that's bad at the other. Coverage is also a business number, not just a model one: a marketplace whose recommender ignores 95% of its sellers has a seller-retention problem, whatever the click-through rate says.