principlepythonMajor
Distinct-author counts across a collection change must be normalized by the median entity, not by the pool of authors
Viewed 0 times
distinct authorsunique creatorsnormalizationcrawl breakrobustness checkmedian normalization
terminal
Problem
When validating a social-media signal (per-entity mention growth year over year) with a "more distinct authors, not just more posts" robustness check, normalizing an entity's distinct-author count by the number of distinct authors who mentioned ANY entity looks natural but fails badly when the collection changed between periods. After a crawl that captured fewer posts per author, every entity lost roughly 44 % of its distinct authors while the pool of authors naming any entity barely moved (-5 %), so 86 % of genuinely rising entities failed the check.
Solution
Normalize each entity's distinct-author ratio (period 2 / period 1) by the cross-sectional MEDIAN of that same ratio over all entities with enough authors (e.g. >= 30 in period 1), then require the entity to beat the median by a margin (e.g. x1.10). Pair it with "growth still holds after removing the top-5 authors of each period" to catch single-account spam. Mark entities with too few rows in the verification sample as "not verifiable" rather than "failed". Calibrate any new check on its fail rate across all candidates before trusting it: a check that fails most rows is usually miscalibrated, not strict.
Why
The probability that a given author mentions a specific entity scales with how many of that author's posts were collected, while the probability that the author mentions at least one of thousands of entities saturates. A per-author sampling change therefore shrinks entity-level distinct counts far more than the pool's distinct count, so the pool ratio is the wrong denominator.
Gotchas
- Run every new robustness check over all candidates first and look at its fail rate before gating on it
- Separate 'fails' from 'not verifiable' when the verification sample is a subset of the main data
Code Snippets
Median-entity normalization of distinct authors
ratios = [e.authors_p2 / e.authors_p1 for e in entities if e.authors_p1 >= 30]
med = statistics.median(ratios)
rel = (x.authors_p2 / x.authors_p1) / med # > 1.10 = more people talk about it than for a typical entityContext
Building robustness checks for a time-series signal derived from scraped posts when the scrape depth per author differs between the compared periods.
Revisions (0)
No revisions yet.