Repository navigation
feat(conflate): add matcher diagnostics to the spider stats - #937
Merged
Merged
Conversation
Conflate now writes conflate.spider-diagnostics.tsv on the side: for each spider, why its missing_in_osm features found no match (no OSM feature of the kind close enough, all rejected, or taken by another feature of the spider), a histogram of the distance to the nearest rejected candidate, and chance pairs: how many of a sample of about 100 features per spider still match when moved 2 km away. compute_spider_stats adds these to spider-stats.parquet, together with the median offset of matched features from their OSM feature, per spider and per brand and country, and how many features share their position with another of the spider. Part of #924. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ttfb2LhDRExioXkdHbxLno
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.
Requested by Sascha · project thread
Part 6 of #924: matcher diagnostics in
spider-stats.parquet.From conflate
Conflate writes
conflate.spider-diagnostics.tsvon the side (newconflate/diagnostics.rs), becauseconflated.parquetdoesn't keep rejected candidates:missing_in_osmrow counts asmissing_no_candidate(no OSM feature of the kind within the matcher's distance),missing_rejected(there are some, but none scored above 0), ormissing_taken(accepted candidates went to other features of the spider inassign_exclusive). These three add up tomissing_in_osm.missing_rejected, a histogram of the distance to the nearest rejected candidate, with the bins ofdistance_m. To bound the cost, it looks at up to 64 rejected candidates per feature and decodes their geometry only for features that end up missing.chance_matched / chance_sampledoverstates the share of wrong matches, as in the infrastructure notes. The sample comes from hashing spider and position in the file, so it's the same on every run.Conflate's cache now also requires the side file to exist.
From conflated.parquet
offset_east_m/offset_north_m: the medians of how far matched ATP features lie east and north of their OSM feature, centroid to centroid. Given per spider, and per brand and country inbrands, so a shift in one country shows (likehemain the Netherlands).shared_positions: features at exactly the same position as another feature of the spider.Cost
Not yet measured on the planet. The extra work is the chance pairs (about 100 matchings per spider, at most ~576k in all) and the nearest-candidate distances for missing features. I'd check the
conflate.chance_pairs: donelog line after the next weekly run.Testing
cargo fmt,cargo clippy --all-targets -D warnings,cargo test.Left for later
From the "trust" list in #924: classifying tag differences (such as opening hours off by more than 60 minutes) and counting values that don't parse.
Generated by Claude Code