DistinguishingTokenStage - #469
Draft
Robin Linacre (RobinL) wants to merge 1 commit into
Draft
Conversation
🚨 Benchmark Check Required Before MergeBefore merging this PR, make sure that you run the following check to test for performance regression: bash ./shell/compare_commits.sh \
-b main \
-c 1af7d0e0f133c651a41f72c5abfb4930f5ea4b54 \
-d rhondda,aberdeenshire,hackney,mid_sussexThis comment updates automatically whenever a new commit is pushed to the PR. Note If you have changed the cleaning, you will need to rerun cleaning prep in order to test these changes successfully. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This extends the local distinguishing-token work in #444 by exposing the same
signal as an optional deterministic
DistinguishingTokenStage.The stage matches a non-empty, locally distinguishing canonical prefix at the
start of an address, followed by the next two canonical tokens in order. It
allows at most two safe gap tokens, requires an exact postcode, and only emits
a match when one distinct canonical ID qualifies.
Canonical preparation is opt-in via
derive_distinguishing_wrt_adjacent_records=True; existing defaults areunchanged. This PR does not modify the packaged Splink model.
Results
Both arms independently process records left unmatched by
ExactMatchStage.This gives substantially higher recall than peeled matching, while retaining
high precision with a small overall reduction.
Validation
(messy ID, canonical ID)pairs across all four benchmark areas.chunks, public stage discovery, and missing-preparation errors.
304 passed.