[block_candidates()], [lsh_candidates()] and [top_k_candidates()] already attach this record to their own output. Use this when the candidate set came from somewhere else – a hand-written filter, a database query, a subset taken for speed – because a candidate set with no recall figure attached is a reidentification rate with an unknown downward bias.
Arguments
- candidates
a candidate table in raw_anon form (as from [join_raw_anon_data()]) or a score table (as from [score_num()])
- raw, anon
the data frames the candidates were drawn from. Optional, but without them the totals have to be inferred from the candidate table itself, which **cannot see records that were dropped entirely** – pass them whenever you have them.
- row_number
name of the row-number column, before RAW_/ANON_ prefixing (default "ROW_NUMBER")
Examples
raw <- data.frame(ROW_NUMBER = 1:6, ZIP = c("A", "A", "B", "B", "C", "C"))
cand <- block_candidates(raw, raw, keys = "ZIP")
blocking_recall(cand, raw, raw)
#> blocking (measured): 12 of 36 pair(s) kept (33.33% of the full 6 x 6 join)
#> recall : 1.0000 (6 of 6 true pair(s) retained)
#> ANON records with no candidate at all: 0