What does Blue-Ocean Keywords and Thematic Bundles conclude, in numbers, about “Clustering the Catalogue into Themes and Measuring Bundle Overlap”?
Answer: Jaccard similarity of keyword sets with average linkage clusters a catalogue into themes automatically; in the illustrative catalogue the similarity inside clusters is 0.269 and across clusters only 0.007. Target readers of a themed collection still lack, on average, more than sixty per cent of its value, which makes it a better offer than a cross-theme collection; yet nearly a quarter of them already own more than half of it, and a full-price offer does almost nothing for them.
Scope of the numbers: Parameters are illustrative and all calculations are generated by the book's programs. This is general business analysis, not personalised business, legal or tax advice, and it promises no income; the catalogue is described publicly only as the 100 published titles, with "more than 330 manuscripts" as an on-site statement.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.007, 0.269
| volumes 24, clusters 9 at cut 0.12 | |
| V01 V02 V03 V04 V05 | pricing, bundling, menu |
| V06 V07 V08 V10 | ranking, search, demand |
| V09 | crawl, indexing, long-tail |
| V11 V12 | routing, time-windows, buyers |
| V13 V14 | inventory, lead-time, restock |
| V15 V16 V17 | amm, arbitrage, liquidity |
| V18 V19 V20 | property, mortgage, rent |
| V21 V22 | cashflow, delivery, reliability |
| V23 V24 | abstracts, catalogue, library |
| mean Jaccard inside clusters 0.269, across 0.007 | |
| pairs compared: 276 |
Show the full program
# Chapter 4. p41: clustering a catalogue into themes by Jaccard overlap.
# Synthetic catalogue of 24 volumes (ids V01..V24), each tagged with a
# keyword set; tags are illustrative, loosely modelled on the kinds of
# subjects in a bilingual monograph library. Similarity of two volumes
# is |A & B| / |A | B| (Jaccard). Average-linkage agglomerative
# clustering merges the closest pair until no pair of clusters has
# mean similarity above CUT. Ties break on the smallest ids, so the
# result does not depend on hash order.
import itertools
import math
CUT = 0.12
CAT = {
"V01": "bundling pricing information-goods correlation revenue",
"V02": "bundling mixed-bundling pricing screening menu",
"V03": "pricing left-digit price-ending perception menu",
"V04": "bundling licensing tiers pricing revenue",
"V05": "screening menu incentive tiers pricing",
"V06": "keyword search zipf demand ranking",
"V07": "keyword long-tail ranking sales-rank demand",
"V08": "search ranking click position cascade",
"V09": "seo long-tail indexing search crawl",
"V10": "generative-search citation ranking search",
"V11": "routing tsp time-windows buyers shopping",
"V12": "routing vehicle depot time-windows queue",
"V13": "queue inventory restock buyers lead-time",
"V14": "inventory restock newsvendor demand lead-time",
"V15": "liquidity amm lvr volatility arbitrage",
"V16": "liquidity vault kelly tail-risk volatility",
"V17": "arbitrage sandwich slippage amm mev",
"V18": "property valuation rent yield mortgage",
"V19": "property mortgage amortisation yield cashflow",
"V20": "rent valuation hedonic property location",
"V21": "cashflow refund chargeback delivery reliability",
"V22": "reliability delivery queue poisson cashflow",
"V23": "catalogue classification library abstracts",
"V24": "library catalogue abstracts bundling access",
}
def jac(a, b):
return len(a & b) / len(a | b)
def cluster(sets, cut):
ids = sorted(sets)
sim = {(a, b): jac(sets[a], sets[b])
for a, b in itertools.combinations(ids, 2)}
groups = [[i] for i in ids]
def link(g, h):
vals = [sim[tuple(sorted((a, b)))] for a in g for b in h]
return math.fsum(vals) / len(vals)
while len(groups) > 1:
best = None
for x, y in itertools.combinations(range(len(groups)), 2):
s = link(groups[x], groups[y])
if best is None or s > best[0] + 1e-12:
best = (s, x, y)
if best[0] <= cut:
break
_, x, y = best
groups[x] = sorted(groups[x] + groups[y])
del groups[y]
return sorted(groups, key=lambda g: g[0]), sim
if __name__ == "__main__":
sets = {k: set(v.split()) for k, v in CAT.items()}
groups, sim = cluster(sets, CUT)
inside, across = [], []
label = {i: n for n, g in enumerate(groups) for i in g}
for (a, b), s in sorted(sim.items()):
(inside if label[a] == label[b] else across).append(s)
print("volumes {}, clusters {} at cut {:.2f}".format(
len(sets), len(groups), CUT))
for g in groups:
tags = {}
for i in g:
for t in sets[i]:
tags[t] = tags.get(t, 0) + 1
top = sorted(tags, key=lambda t: (-tags[t], t))[:3]
print(" {:<28} {}".format(" ".join(g), ", ".join(top)))
print("mean Jaccard inside clusters {:.3f}, across {:.3f}".format(
math.fsum(inside) / len(inside), math.fsum(across) / len(across)))
print("pairs compared: {:,}".format(len(sim)))Single source and citation
Fan, Y. (2026). Niche Keyword Positioning for Digital Monograph Catalogues, High-Ticket Thematic Bundle Direct Sales and Automated Knowledge Cashflow (Version 1.0.0), Chapter 4: Clustering the Catalogue into Themes and Measuring Bundle Overlap. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-356 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026356,
author = {Fan, Yafu},
title = {Niche Keyword Positioning for Digital Monograph Catalogues, High-Ticket Thematic Bundle Direct Sales and Automated Knowledge Cashflow},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Power Laws of Search Demand: Rank, Sales and the Share of the Long Tail
- Chapter 2 · Front-Page Probability and the Blue-Ocean Keyword Score
- Chapter 3 · Seven Keyword Slots: a Compliance Filter and an Exact Knapsack
- Chapter 5 · Bundle Valuation: Correlation, Marginal Cost and Past Purchases
- Chapter 6 · Two Price Tiers: Screening at 99 and 299, the Left Digit, and a Multi-Step Funnel
- Chapter 7 · Classical Sources: the Treatise on Literature of the Hanshu and Naudé's Advice on Establishing a Library
- Chapter 8 · The Empirical Loop: a Weekly Cash Ledger for the Catalogue and the Pricing and Closing Tool Specification