@mailwoman/registry 9.4.0 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/lib/address-key.ts +14 -10
- package/lib/geocode-handler.ts +6 -4
- package/lib/geojson.ts +13 -17
- package/lib/ingest.ts +57 -83
- package/lib/learned-scorer.ts +38 -44
- package/lib/map-html.ts +24 -70
- package/lib/models/crosssource-gbt-en-us.ts +9 -7
- package/lib/models/dedup-gbt-en-us.ts +9 -8
- package/lib/models/org-crosssource-gbt-en-us.ts +10 -8
- package/lib/reconcile.ts +45 -55
- package/lib/resolve.ts +180 -124
- package/lib/types.ts +18 -12
- package/out/address-key.d.ts +14 -10
- package/out/address-key.d.ts.map +1 -1
- package/out/address-key.js +14 -10
- package/out/address-key.js.map +1 -1
- package/out/geocode-handler.d.ts +6 -4
- package/out/geocode-handler.d.ts.map +1 -1
- package/out/geocode-handler.js +6 -4
- package/out/geocode-handler.js.map +1 -1
- package/out/geojson.d.ts +9 -5
- package/out/geojson.d.ts.map +1 -1
- package/out/geojson.js +13 -15
- package/out/geojson.js.map +1 -1
- package/out/ingest.d.ts +46 -75
- package/out/ingest.d.ts.map +1 -1
- package/out/ingest.js +27 -54
- package/out/ingest.js.map +1 -1
- package/out/learned-scorer.d.ts +29 -26
- package/out/learned-scorer.d.ts.map +1 -1
- package/out/learned-scorer.js +31 -39
- package/out/learned-scorer.js.map +1 -1
- package/out/map-html.d.ts +13 -32
- package/out/map-html.d.ts.map +1 -1
- package/out/map-html.js +9 -62
- package/out/map-html.js.map +1 -1
- package/out/models/crosssource-gbt-en-us.d.ts +9 -7
- package/out/models/crosssource-gbt-en-us.d.ts.map +1 -1
- package/out/models/crosssource-gbt-en-us.js +9 -7
- package/out/models/crosssource-gbt-en-us.js.map +1 -1
- package/out/models/dedup-gbt-en-us.d.ts +9 -8
- package/out/models/dedup-gbt-en-us.d.ts.map +1 -1
- package/out/models/dedup-gbt-en-us.js +9 -8
- package/out/models/dedup-gbt-en-us.js.map +1 -1
- package/out/models/org-crosssource-gbt-en-us.d.ts +10 -8
- package/out/models/org-crosssource-gbt-en-us.d.ts.map +1 -1
- package/out/models/org-crosssource-gbt-en-us.js +10 -8
- package/out/models/org-crosssource-gbt-en-us.js.map +1 -1
- package/out/reconcile.d.ts +35 -50
- package/out/reconcile.d.ts.map +1 -1
- package/out/reconcile.js +19 -43
- package/out/reconcile.js.map +1 -1
- package/out/resolve.d.ts +150 -90
- package/out/resolve.d.ts.map +1 -1
- package/out/resolve.js +62 -63
- package/out/resolve.js.map +1 -1
- package/out/tools/coverage-reconciliation.d.ts +23 -23
- package/out/tools/coverage-reconciliation.d.ts.map +1 -1
- package/out/tools/coverage-reconciliation.js +15 -26
- package/out/tools/coverage-reconciliation.js.map +1 -1
- package/out/tools/cross/dataset-correlation.d.ts +58 -0
- package/out/tools/cross/dataset-correlation.d.ts.map +1 -0
- package/out/tools/{cross-dataset-correlation.js → cross/dataset-correlation.js} +10 -62
- package/out/tools/cross/dataset-correlation.js.map +1 -0
- package/out/tools/cross/source-threshold-sweep.d.ts +60 -0
- package/out/tools/cross/source-threshold-sweep.d.ts.map +1 -0
- package/out/tools/{cross-source-threshold-sweep.js → cross/source-threshold-sweep.js} +15 -41
- package/out/tools/cross/source-threshold-sweep.js.map +1 -0
- package/out/tools/dedup-ceiling.d.ts +23 -26
- package/out/tools/dedup-ceiling.d.ts.map +1 -1
- package/out/tools/dedup-ceiling.js +22 -41
- package/out/tools/dedup-ceiling.js.map +1 -1
- package/out/tools/eval-geocoder.d.ts +22 -15
- package/out/tools/eval-geocoder.d.ts.map +1 -1
- package/out/tools/eval-geocoder.js +5 -6
- package/out/tools/eval-geocoder.js.map +1 -1
- package/out/tools/geocoder/namesake-probe.d.ts +33 -0
- package/out/tools/geocoder/namesake-probe.d.ts.map +1 -0
- package/out/tools/{geocoder-namesake-probe.js → geocoder/namesake-probe.js} +7 -8
- package/out/tools/geocoder/namesake-probe.js.map +1 -0
- package/out/tools/geocoder/vs-provided-coords.d.ts +53 -0
- package/out/tools/geocoder/vs-provided-coords.d.ts.map +1 -0
- package/out/tools/{geocoder-vs-provided-coords.js → geocoder/vs-provided-coords.js} +31 -28
- package/out/tools/geocoder/vs-provided-coords.js.map +1 -0
- package/out/tools/gold-set-sample.d.ts +27 -18
- package/out/tools/gold-set-sample.d.ts.map +1 -1
- package/out/tools/gold-set-sample.js +18 -22
- package/out/tools/gold-set-sample.js.map +1 -1
- package/out/tools/learned/scorer/clustering-eval.d.ts +77 -0
- package/out/tools/learned/scorer/clustering-eval.d.ts.map +1 -0
- package/out/tools/{learned-scorer-clustering-eval.js → learned/scorer/clustering-eval.js} +29 -39
- package/out/tools/learned/scorer/clustering-eval.js.map +1 -0
- package/out/tools/learned/scorer/crossstate-eval.d.ts +65 -0
- package/out/tools/learned/scorer/crossstate-eval.d.ts.map +1 -0
- package/out/tools/{learned-scorer-crossstate-eval.js → learned/scorer/crossstate-eval.js} +20 -26
- package/out/tools/learned/scorer/crossstate-eval.js.map +1 -0
- package/out/tools/learned/scorer/eval.d.ts +60 -0
- package/out/tools/learned/scorer/eval.d.ts.map +1 -0
- package/out/tools/{learned-scorer-eval.js → learned/scorer/eval.js} +12 -72
- package/out/tools/learned/scorer/eval.js.map +1 -0
- package/out/tools/matcher-scale.d.ts +12 -17
- package/out/tools/matcher-scale.d.ts.map +1 -1
- package/out/tools/matcher-scale.js +11 -29
- package/out/tools/matcher-scale.js.map +1 -1
- package/out/tools/nppes/dedup-benchmark.d.ts +81 -0
- package/out/tools/nppes/dedup-benchmark.d.ts.map +1 -0
- package/out/tools/{nppes-dedup-benchmark.js → nppes/dedup-benchmark.js} +21 -67
- package/out/tools/nppes/dedup-benchmark.js.map +1 -0
- package/out/tools/nppes/org-name.d.ts +5 -4
- package/out/tools/nppes/org-name.d.ts.map +1 -1
- package/out/tools/nppes/org-name.js +2 -2
- package/out/tools/nppes/org-name.js.map +1 -1
- package/out/tools/nppes/overmerge-packet.d.ts +15 -11
- package/out/tools/nppes/overmerge-packet.d.ts.map +1 -1
- package/out/tools/nppes/overmerge-packet.js +7 -8
- package/out/tools/nppes/overmerge-packet.js.map +1 -1
- package/out/tools/nppes/report.d.ts +17 -13
- package/out/tools/nppes/report.d.ts.map +1 -1
- package/out/tools/nppes/report.js +6 -14
- package/out/tools/nppes/report.js.map +1 -1
- package/out/tools/nppes/sample.d.ts +28 -17
- package/out/tools/nppes/sample.d.ts.map +1 -1
- package/out/tools/nppes/sample.js +23 -26
- package/out/tools/nppes/sample.js.map +1 -1
- package/out/tools/nppes/scoring.d.ts +7 -6
- package/out/tools/nppes/scoring.d.ts.map +1 -1
- package/out/tools/nppes/scoring.js +6 -5
- package/out/tools/nppes/scoring.js.map +1 -1
- package/out/tools/nppes/settings.d.ts +10 -7
- package/out/tools/nppes/settings.d.ts.map +1 -1
- package/out/tools/nppes/settings.js +16 -16
- package/out/tools/nppes/settings.js.map +1 -1
- package/out/tools/nppes/truth-grains.d.ts +36 -23
- package/out/tools/nppes/truth-grains.d.ts.map +1 -1
- package/out/tools/nppes/truth-grains.js +36 -20
- package/out/tools/nppes/truth-grains.js.map +1 -1
- package/out/tools/shared.d.ts +63 -59
- package/out/tools/shared.d.ts.map +1 -1
- package/out/tools/shared.js +49 -66
- package/out/tools/shared.js.map +1 -1
- package/out/tools/train/cross-gbt.d.ts +88 -0
- package/out/tools/train/cross-gbt.d.ts.map +1 -0
- package/out/tools/{train-cross-gbt.js → train/cross-gbt.js} +15 -26
- package/out/tools/train/cross-gbt.js.map +1 -0
- package/out/tools/train/gbt.d.ts +85 -0
- package/out/tools/train/gbt.d.ts.map +1 -0
- package/out/tools/{train-gbt.js → train/gbt.js} +28 -32
- package/out/tools/train/gbt.js.map +1 -0
- package/out/tools/train/org-cross-gbt.d.ts +84 -0
- package/out/tools/train/org-cross-gbt.d.ts.map +1 -0
- package/out/tools/{train-org-cross-gbt.js → train/org-cross-gbt.js} +19 -23
- package/out/tools/train/org-cross-gbt.js.map +1 -0
- package/out/tools/txhhsc-to-oarow.d.ts +14 -9
- package/out/tools/txhhsc-to-oarow.d.ts.map +1 -1
- package/out/tools/txhhsc-to-oarow.js +16 -15
- package/out/tools/txhhsc-to-oarow.js.map +1 -1
- package/out/tools/viz/browser.d.ts +6 -5
- package/out/tools/viz/browser.d.ts.map +1 -1
- package/out/tools/viz/browser.js +6 -5
- package/out/tools/viz/browser.js.map +1 -1
- package/out/tools/viz/cross-dataset-map.d.ts +7 -4
- package/out/tools/viz/cross-dataset-map.d.ts.map +1 -1
- package/out/tools/viz/cross-dataset-map.js +9 -6
- package/out/tools/viz/cross-dataset-map.js.map +1 -1
- package/out/tools/viz/geocode-first-surface.d.ts +10 -5
- package/out/tools/viz/geocode-first-surface.d.ts.map +1 -1
- package/out/tools/viz/geocode-first-surface.js +16 -11
- package/out/tools/viz/geocode-first-surface.js.map +1 -1
- package/out/tools/viz/{render-map.d.ts → render/map.d.ts} +6 -6
- package/out/tools/viz/render/map.d.ts.map +1 -0
- package/out/tools/viz/{render-map.js → render/map.js} +7 -6
- package/out/tools/viz/render/map.js.map +1 -0
- package/out/tools/viz/render.d.ts +12 -8
- package/out/tools/viz/render.d.ts.map +1 -1
- package/out/tools/viz/render.js +8 -7
- package/out/tools/viz/render.js.map +1 -1
- package/out/tools/viz/source-provenance-map.d.ts +19 -7
- package/out/tools/viz/source-provenance-map.d.ts.map +1 -1
- package/out/tools/viz/source-provenance-map.js +11 -8
- package/out/tools/viz/source-provenance-map.js.map +1 -1
- package/out/tools/viz/yardstick-figure.d.ts +2 -21
- package/out/tools/viz/yardstick-figure.d.ts.map +1 -1
- package/out/tools/viz/yardstick-figure.js +3 -39
- package/out/tools/viz/yardstick-figure.js.map +1 -1
- package/out/types.d.ts +17 -11
- package/out/types.d.ts.map +1 -1
- package/out/types.js +2 -2
- package/out/types.js.map +1 -1
- package/package.json +41 -184
- package/{lib/tools → tools}/coverage-reconciliation.ts +27 -30
- package/{lib/tools/cross-dataset-correlation.ts → tools/cross/dataset-correlation.ts} +31 -72
- package/{lib/tools/cross-source-threshold-sweep.ts → tools/cross/source-threshold-sweep.ts} +29 -46
- package/{lib/tools → tools}/dedup-ceiling.ts +34 -45
- package/tools/eval-geocoder.ts +74 -0
- package/{lib/tools/geocoder-namesake-probe.ts → tools/geocoder/namesake-probe.ts} +9 -8
- package/{lib/tools/geocoder-vs-provided-coords.ts → tools/geocoder/vs-provided-coords.ts} +39 -30
- package/{lib/tools → tools}/gold-set-sample.ts +35 -29
- package/{lib/tools/learned-scorer-clustering-eval.ts → tools/learned/scorer/clustering-eval.ts} +49 -45
- package/{lib/tools/learned-scorer-crossstate-eval.ts → tools/learned/scorer/crossstate-eval.ts} +34 -30
- package/{lib/tools/learned-scorer-eval.ts → tools/learned/scorer/eval.ts} +35 -78
- package/{lib/tools → tools}/matcher-scale.ts +21 -33
- package/{lib/tools/nppes-dedup-benchmark.ts → tools/nppes/dedup-benchmark.ts} +37 -82
- package/{lib/tools → tools}/nppes/org-name.ts +5 -4
- package/{lib/tools → tools}/nppes/overmerge-packet.ts +17 -13
- package/{lib/tools → tools}/nppes/report.ts +32 -25
- package/{lib/tools → tools}/nppes/sample.ts +41 -36
- package/{lib/tools → tools}/nppes/scoring.ts +7 -6
- package/{lib/tools → tools}/nppes/settings.ts +16 -16
- package/{lib/tools → tools}/nppes/truth-grains.ts +46 -26
- package/{lib/tools → tools}/shared.ts +73 -83
- package/{lib/tools/train-cross-gbt.ts → tools/train/cross-gbt.ts} +38 -34
- package/{lib/tools/train-gbt.ts → tools/train/gbt.ts} +55 -41
- package/{lib/tools/train-org-cross-gbt.ts → tools/train/org-cross-gbt.ts} +39 -30
- package/{lib/tools → tools}/txhhsc-to-oarow.ts +24 -18
- package/{lib/tools → tools}/viz/browser.ts +6 -5
- package/{lib/tools → tools}/viz/cross-dataset-map.ts +15 -9
- package/{lib/tools → tools}/viz/geocode-first-surface.ts +28 -17
- package/{lib/tools/viz/render-map.ts → tools/viz/render/map.ts} +7 -6
- package/{lib/tools → tools}/viz/render.ts +16 -11
- package/{lib/tools → tools}/viz/source-provenance-map.ts +30 -15
- package/{lib/tools → tools}/viz/yardstick-figure.ts +6 -43
- package/lib/tools/eval-geocoder.ts +0 -67
- package/lib/tools/index.ts +0 -31
- package/out/tools/cross-dataset-correlation.d.ts +0 -65
- package/out/tools/cross-dataset-correlation.d.ts.map +0 -1
- package/out/tools/cross-dataset-correlation.js.map +0 -1
- package/out/tools/cross-source-threshold-sweep.d.ts +0 -66
- package/out/tools/cross-source-threshold-sweep.d.ts.map +0 -1
- package/out/tools/cross-source-threshold-sweep.js.map +0 -1
- package/out/tools/geocoder-namesake-probe.d.ts +0 -32
- package/out/tools/geocoder-namesake-probe.d.ts.map +0 -1
- package/out/tools/geocoder-namesake-probe.js.map +0 -1
- package/out/tools/geocoder-vs-provided-coords.d.ts +0 -50
- package/out/tools/geocoder-vs-provided-coords.d.ts.map +0 -1
- package/out/tools/geocoder-vs-provided-coords.js.map +0 -1
- package/out/tools/index.d.ts +0 -31
- package/out/tools/index.d.ts.map +0 -1
- package/out/tools/index.js +0 -31
- package/out/tools/index.js.map +0 -1
- package/out/tools/learned-scorer-clustering-eval.d.ts +0 -74
- package/out/tools/learned-scorer-clustering-eval.d.ts.map +0 -1
- package/out/tools/learned-scorer-clustering-eval.js.map +0 -1
- package/out/tools/learned-scorer-crossstate-eval.d.ts +0 -59
- package/out/tools/learned-scorer-crossstate-eval.d.ts.map +0 -1
- package/out/tools/learned-scorer-crossstate-eval.js.map +0 -1
- package/out/tools/learned-scorer-eval.d.ts +0 -77
- package/out/tools/learned-scorer-eval.d.ts.map +0 -1
- package/out/tools/learned-scorer-eval.js.map +0 -1
- package/out/tools/nppes-dedup-benchmark.d.ts +0 -101
- package/out/tools/nppes-dedup-benchmark.d.ts.map +0 -1
- package/out/tools/nppes-dedup-benchmark.js.map +0 -1
- package/out/tools/train-cross-gbt.d.ts +0 -78
- package/out/tools/train-cross-gbt.d.ts.map +0 -1
- package/out/tools/train-cross-gbt.js.map +0 -1
- package/out/tools/train-gbt.d.ts +0 -69
- package/out/tools/train-gbt.d.ts.map +0 -1
- package/out/tools/train-gbt.js.map +0 -1
- package/out/tools/train-org-cross-gbt.d.ts +0 -71
- package/out/tools/train-org-cross-gbt.d.ts.map +0 -1
- package/out/tools/train-org-cross-gbt.js.map +0 -1
- package/out/tools/viz/render-map.d.ts.map +0 -1
- package/out/tools/viz/render-map.js.map +0 -1
|
@@ -3,31 +3,10 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Builds a varied multi-record set per NPI from real data.
|
|
7
|
+
* Runs the matcher without NPI values, then scores recovered clusters against the NPI grouping.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
* multi-record set per NPI from REAL data — the registry's primary record, each alternate
|
|
10
|
-
* organization name (`nppes_other-names`, NAME drift at the same place), and the mailing address
|
|
11
|
-
* where it differs from the practice location (ADDRESS variation) — then run the matcher BLIND to
|
|
12
|
-
* the NPI (geocode → block → Fellegi-Sunter + EM → cluster) and score the recovered clusters
|
|
13
|
-
* against the NPI grouping (pairwise P/R/F1 + adjusted Rand).
|
|
14
|
-
*
|
|
15
|
-
* Honest reading (per the epic): NPI-as-truth is CONSERVATIVE. A cluster that merges two NPIs is a
|
|
16
|
-
* candidate "same entity, two NPIs" surfaced for review, not an error we adjudicate; and a single
|
|
17
|
-
* NPI split across two genuinely-distant addresses is geo-first behaving correctly, counted here
|
|
18
|
-
* as a recall miss. We resolve and report; interpretation is the consumer's.
|
|
19
|
-
*
|
|
20
|
-
* Sample: a tractable, variation-rich slice — providers in one state (default TX) that have ≥1
|
|
21
|
-
* alternate name, so every entity has ≥2 records and the dedup is non-trivial. Streams the 4.8 GB
|
|
22
|
-
* registry via `streamRows` (#616), so nothing loads whole.
|
|
23
|
-
*
|
|
24
|
-
* The stages live in `./nppes/`: the sample, the scorer, the truth grains, the setting progression,
|
|
25
|
-
* the adjudication packet, and the report. This file is the orchestration — read it for the order
|
|
26
|
-
* of operations, the modules for what each stage does.
|
|
27
|
-
*
|
|
28
|
-
* Run: `mailwoman registry scorer-eval nppes-benchmark [--state TX] [--max-npis 300]
|
|
29
|
-
* [--wof <admin.db>] [--data-root <dir>] [--no-train-em]
|
|
30
|
-
* [--out-md docs/articles/evals/matcher-dedup/<date>-nppes-dedup-benchmark.md]`
|
|
9
|
+
* Run: `mailwoman registry scorer-eval nppes-benchmark [--state TX] [--max-npis 300] [--wof <admin.db>] [--data-root <dir>] [--no-train-em] [--out-md docs/articles/evals/matcher-dedup/<date>-nppes-dedup-benchmark.md]`
|
|
31
10
|
*/
|
|
32
11
|
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
33
12
|
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
@@ -50,7 +29,7 @@ import { buildSettings } from "#tools/nppes/settings";
|
|
|
50
29
|
import { buildOrgNameCoordGrain, buildOrgNameGrain, buildOrgNameH3Grain, collectPrimaryCoordinates, } from "#tools/nppes/truth-grains";
|
|
51
30
|
import { stateOption } from "#tools/shared";
|
|
52
31
|
/**
|
|
53
|
-
* The
|
|
32
|
+
* The NPPES dedup benchmark (see the module doc), emitting the markdown report to stdout.
|
|
54
33
|
*/
|
|
55
34
|
export async function nppesDedupBenchmark(options, report) {
|
|
56
35
|
const SOURCES = options.sources || dataRootPath("record-matcher", "sources");
|
|
@@ -62,34 +41,29 @@ export async function nppesDedupBenchmark(options, report) {
|
|
|
62
41
|
const CANDIDATE = options.candidate || "";
|
|
63
42
|
const PARALLEL_GEOCODE = options.parallelGeocode ?? false;
|
|
64
43
|
const GEO_CONC = options.geoConcurrency ?? 2;
|
|
65
|
-
// --- Phases A + B: the variation-rich sample plus the corpus-wide address-frequency table. ---
|
|
66
44
|
const { rows, keptNpis, npiPrimary, addressFrequency } = await buildNPPESSample({
|
|
67
45
|
registryPath: `${SOURCES}/nppes_npi-registry_20260607.tsv`,
|
|
68
46
|
otherNamesPath: `${SOURCES}/nppes_other-names_20260607.tsv`,
|
|
69
47
|
state: STATE,
|
|
70
48
|
maxNpis: MAX_NPIS,
|
|
71
49
|
}, report);
|
|
72
|
-
//
|
|
73
|
-
// geocoder is injected (see ./eval-geocoder.ts); model-swap for a multi-version curve rides the
|
|
74
|
-
// command's factory config (--model/--tokenizer/--model-card; modelCardPath is MANDATORY when
|
|
75
|
-
// modelPath is set — without it a STAGE3 model silently mis-decodes into empty parses). ---
|
|
50
|
+
// Without `modelCardPath`, a STAGE3 model silently mis-decodes into empty parses when `modelPath` is set.
|
|
76
51
|
report?.("[C] building the geocoder + geocoding records…");
|
|
77
52
|
const mapping = {
|
|
78
53
|
id: "npi",
|
|
79
54
|
name: "name",
|
|
80
55
|
organization: "org",
|
|
81
56
|
address: "address",
|
|
82
|
-
// `entityTruth`
|
|
83
|
-
// matching
|
|
57
|
+
// `entityTruth` appears as an attribute purely for scoring, never as a discriminator
|
|
58
|
+
// in matching, carrying the site-level label alongside the NPI.
|
|
84
59
|
attributes: { authorizedOfficial: "auth", taxonomy: "taxonomy", entityTruth: "entityID" },
|
|
85
60
|
source: "nppes",
|
|
86
61
|
};
|
|
87
62
|
let geo = 0;
|
|
88
63
|
let records;
|
|
89
64
|
if (PARALLEL_GEOCODE) {
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
// (a separator toggle) is a no-op for this path; `normalizeCase` follows the worker default (on).
|
|
65
|
+
// `address` is a single pre-joined column on this path, so `--legacy-join` is a no-op
|
|
66
|
+
// and `normalizeCase` follows the worker default (on).
|
|
93
67
|
if (!options.geocodeStream) {
|
|
94
68
|
throw new Error("parallelGeocode requires the injected geocodeStream (see ./eval-geocoder.ts)");
|
|
95
69
|
}
|
|
@@ -102,13 +76,13 @@ export async function nppesDedupBenchmark(options, report) {
|
|
|
102
76
|
geo++;
|
|
103
77
|
}
|
|
104
78
|
}
|
|
105
|
-
//
|
|
79
|
+
// Restore input order because `geocodeStream` yields in completion order
|
|
80
|
+
// and downstream cluster tie-breaks must be byte-stable.
|
|
106
81
|
geocoded.sort((a, b) => (order.get(a.id) ?? 0) - (order.get(b.id) ?? 0));
|
|
107
82
|
records = geocoded;
|
|
108
83
|
}
|
|
109
84
|
else {
|
|
110
85
|
const geocoder = await options.createGeocoder({ normalizeCase: !LEGACY });
|
|
111
|
-
// Count placements at the boundary (parity with the retired in-script counter).
|
|
112
86
|
const countedGeocodeForIngest = async (raw) => {
|
|
113
87
|
const g = await geocoder.geocodeAddress(raw);
|
|
114
88
|
if (g?.geocode) {
|
|
@@ -123,39 +97,30 @@ export async function nppesDedupBenchmark(options, report) {
|
|
|
123
97
|
geocoder[Symbol.dispose]();
|
|
124
98
|
}
|
|
125
99
|
report?.(` geocoded ${geo}/${rows.length} (${((100 * geo) / rows.length).toFixed(1)}%)`);
|
|
126
|
-
// --- Phase E: score recovered clusters against each truth grain (record.id = the held-out NPI). ---
|
|
127
100
|
const N = records.length;
|
|
128
|
-
// Every grain scores against the
|
|
101
|
+
// Every grain scores against the same record population, so the ARI expectation is fixed for the run.
|
|
129
102
|
const score = (entities, labelOf) => scoreEntities(entities, labelOf, N);
|
|
130
|
-
//
|
|
131
|
-
//
|
|
132
|
-
// both ways isolates how much of the apparent over-merge is NPI over-segmentation, not model error.
|
|
103
|
+
// A score for the same clusters at NPI and entity level isolates how much of the
|
|
104
|
+
// apparent over-merge is NPI over-segmentation rather than model error.
|
|
133
105
|
const npiLabel = (rec) => rec.id;
|
|
134
106
|
const entityLabel = (rec) => rec.attributes?.["entityTruth"] ?? rec.id;
|
|
135
107
|
const orgNameLabel = buildOrgNameGrain(npiPrimary);
|
|
136
108
|
const npiCoord = collectPrimaryCoordinates(records);
|
|
137
109
|
const orgNameCoordLabel = buildOrgNameCoordGrain(npiPrimary, npiCoord);
|
|
138
110
|
const geocodedNpis = [...npiPrimary.keys()].filter((n) => npiCoord.has(n)).length;
|
|
139
|
-
const H3_RES = options.h3Res ?? 11; // res 11 ≈ 25 m edge
|
|
111
|
+
const H3_RES = options.h3Res ?? 11; // res 11 ≈ 25 m edge. res 10 ≈ 65 m (block scale)
|
|
140
112
|
const orgNameH3Label = buildOrgNameH3Grain(npiPrimary, npiCoord, H3_RES);
|
|
141
|
-
// --- Phase D: the comparison-model setting progression — toggle each setting ON in turn at the default
|
|
142
|
-
// threshold to isolate its marginal effect, then sweep the link threshold on the best config (geocode
|
|
143
|
-
// once, resolve many — config is cheap). ---
|
|
144
113
|
report?.(`[D] resolving the setting progression${TRAIN_EM ? " (EM-trained)" : ""}…`);
|
|
145
|
-
//
|
|
146
|
-
//
|
|
147
|
-
// GBT; the learned scorer is measured separately (learned-scorer-clustering-eval / -crossstate-eval).
|
|
114
|
+
// The learned scorer is default-on, so it is pinned off here.
|
|
115
|
+
// Otherwise every row would silently be the GBT.
|
|
148
116
|
const progression = buildSettings(addressFrequency).map((l) => {
|
|
149
117
|
const res = resolveEntities(records, { learnedScorer: false, trainEM: TRAIN_EM, threshold: 0, ...l.config });
|
|
150
118
|
return { ...l, res, score: score(res.entities, npiLabel) };
|
|
151
119
|
});
|
|
152
120
|
const bestSetting = progression.at(-1); // the full setting stack
|
|
153
|
-
// The
|
|
154
|
-
//
|
|
155
|
-
//
|
|
156
|
-
// ≈baseline — NOT a regression, just the honest truth that IDF is a corpus statistic you can't synthesize
|
|
157
|
-
// from a slice. On a FULL-dataset dedup the input IS the corpus and this default reaches the baseline; the
|
|
158
|
-
// CLI passes a corpus-wide table built from the full source files so even a geocoded sub-sample benefits.
|
|
121
|
+
// The shipped out-of-box default auto-computes an input-scoped address-frequency table.
|
|
122
|
+
// on this sub-sampled corpus it is sparse and F1 collapses to ≈baseline, because IDF is a
|
|
123
|
+
// corpus statistic, so the CLI passes a corpus-wide table built from the full source files.
|
|
159
124
|
const defaultRes = resolveEntities(records, { learnedScorer: false, trainEM: TRAIN_EM, threshold: 0 });
|
|
160
125
|
const defaultOutOfBox = score(defaultRes.entities, npiLabel);
|
|
161
126
|
const THRESHOLDS = [0, 4, 8, 12, 16, 20];
|
|
@@ -177,10 +142,6 @@ export async function nppesDedupBenchmark(options, report) {
|
|
|
177
142
|
}
|
|
178
143
|
report?.(` progression @ threshold 0: ${progression.map((p) => `${(100 * p.score.f1).toFixed(1)}%`).join(" → ")} F1`);
|
|
179
144
|
report?.(` default F1 ${(100 * base.score.f1).toFixed(1)}% → best F1 ${(100 * best.score.f1).toFixed(1)}% @ threshold ${best.t}`);
|
|
180
|
-
// --- Phase F: NPI-level vs ENTITY-level truth. Score the SAME clusters against both yardsticks to
|
|
181
|
-
// reveal how much of the apparent over-merge is NPI over-segmentation (one org / many subpart-NPIs,
|
|
182
|
-
// where merging is CORRECT) rather than model error. Two production configs: the FS full setting stack
|
|
183
|
-
// and the shipped default (GBT, default-on) — each fed the corpus-wide address-frequency table. ---
|
|
184
145
|
const entityCount = new Set(records.map((r) => entityLabel(r))).size;
|
|
185
146
|
const orgCount = new Set(records.map((r) => orgNameLabel(r))).size;
|
|
186
147
|
const fsNPI = bestSetting.score;
|
|
@@ -190,16 +151,11 @@ export async function nppesDedupBenchmark(options, report) {
|
|
|
190
151
|
const gbtNPI = score(gbtRes.entities, npiLabel);
|
|
191
152
|
const gbtEntity = score(gbtRes.entities, entityLabel);
|
|
192
153
|
const gbtOrg = score(gbtRes.entities, orgNameLabel);
|
|
193
|
-
// Tier 2D: the coordinate-co-location org-name truth (tighter lower bound).
|
|
194
154
|
const orgCoordCount = new Set(records.map((r) => orgNameCoordLabel(r))).size;
|
|
195
155
|
const fsOrgCoord = score(bestSetting.res.entities, orgNameCoordLabel);
|
|
196
156
|
const gbtOrgCoord = score(gbtRes.entities, orgNameCoordLabel);
|
|
197
|
-
// #109: the H3-cell co-location truth — a robustness check on the haversine coord-grain.
|
|
198
157
|
const orgH3Count = new Set(records.map((r) => orgNameH3Label(r))).size;
|
|
199
158
|
const gbtOrgH3 = score(gbtRes.entities, orgNameH3Label);
|
|
200
|
-
// The adjudication packet grades the SHIPPED (GBT) clusters, because the residual over-merge is small and
|
|
201
|
-
// approaching the measured ~1.6% irreducible ceiling — per-pair human adjudication (same entity? distinct
|
|
202
|
-
// co-located?) is the only instrument left that can separate model error from yardstick error.
|
|
203
159
|
const DUMP_OVERMERGES = options.dumpOvermerges || "";
|
|
204
160
|
if (DUMP_OVERMERGES) {
|
|
205
161
|
const clusters = await writeOvermergePacket(DUMP_OVERMERGES, {
|
|
@@ -212,8 +168,6 @@ export async function nppesDedupBenchmark(options, report) {
|
|
|
212
168
|
});
|
|
213
169
|
report?.(` adjudication packet: ${clusters} over-merged clusters -> ${DUMP_OVERMERGES}`);
|
|
214
170
|
}
|
|
215
|
-
// Optional candidate A/B (--candidate): score a trained GBT module at both levels, at its own
|
|
216
|
-
// recommendedThreshold, alongside the shipped GBT — grades a new model (e.g. corroboration features).
|
|
217
171
|
let cand = null;
|
|
218
172
|
if (CANDIDATE) {
|
|
219
173
|
const mod = (await import(__rewriteRelativeImportExtension(pathToFileURL(resolvePath(CANDIDATE)).href)));
|
|
@@ -269,4 +223,4 @@ export async function nppesDedupBenchmark(options, report) {
|
|
|
269
223
|
}
|
|
270
224
|
return { markdown: md };
|
|
271
225
|
}
|
|
272
|
-
//# sourceMappingURL=
|
|
226
|
+
//# sourceMappingURL=dedup-benchmark.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dedup-benchmark.js","sourceRoot":"","sources":["../../../tools/nppes/dedup-benchmark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;;;;;;;;;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,OAAO,EACN,UAAU,EACV,eAAe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B,CAAC"}
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { orgTokens } from "#tools/shared";
|
|
8
8
|
/**
|
|
9
|
-
* Jaccard floor at or above which two {@linkcode orgTokens} sets count as the
|
|
10
|
-
* threshold.
|
|
9
|
+
* Jaccard floor at or above which two {@linkcode orgTokens} sets count as the
|
|
10
|
+
* same organization — the gold-set threshold.
|
|
11
11
|
*/
|
|
12
12
|
export declare const ORG_TAU = 0.7;
|
|
13
13
|
/**
|
|
14
|
-
* An NPI's primary registry identity: the org-name token set plus the address key of its practice location.
|
|
15
|
-
*
|
|
14
|
+
* An NPI's primary registry identity: the org-name token set plus the address key of its practice location.
|
|
15
|
+
*
|
|
16
|
+
* Every grain of the org-name truth blocks on a location and filters on the tokens.
|
|
16
17
|
*/
|
|
17
18
|
export interface NPIPrimary {
|
|
18
19
|
tokens: Set<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org-name.d.ts","sourceRoot":"","sources":["../../../
|
|
1
|
+
{"version":3,"file":"org-name.d.ts","sourceRoot":"","sources":["../../../tools/nppes/org-name.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC;;;GAGG;AACH,eAAO,MAAM,OAAO,MAAM,CAAA;AAE1B;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { orgTokens } from "#tools/shared";
|
|
8
8
|
/**
|
|
9
|
-
* Jaccard floor at or above which two {@linkcode orgTokens} sets count as the
|
|
10
|
-
* threshold.
|
|
9
|
+
* Jaccard floor at or above which two {@linkcode orgTokens} sets count as the
|
|
10
|
+
* same organization — the gold-set threshold.
|
|
11
11
|
*/
|
|
12
12
|
export const ORG_TAU = 0.7;
|
|
13
13
|
//# sourceMappingURL=org-name.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org-name.js","sourceRoot":"","sources":["../../../
|
|
1
|
+
{"version":3,"file":"org-name.js","sourceRoot":"","sources":["../../../tools/nppes/org-name.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA"}
|
|
@@ -2,38 +2,42 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file
|
|
6
|
-
* formatted for human review.
|
|
5
|
+
* @file Writes the over-merged NPPES clusters with every matcher-visible field for human adjudication.
|
|
7
6
|
*/
|
|
7
|
+
import type { PathBuilderLike } from "path-ts";
|
|
8
8
|
import type { ResolvedEntity } from "#index";
|
|
9
9
|
import type { MessyRow } from "#tools/nppes/sample";
|
|
10
10
|
import type { TruthLabel } from "#tools/nppes/truth-grains";
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* The inputs to {@link writeOvermergePacket}.
|
|
13
13
|
*/
|
|
14
14
|
export interface OvermergePacketInput {
|
|
15
15
|
/**
|
|
16
|
-
* The clusters to inspect
|
|
16
|
+
* The clusters to inspect.
|
|
17
|
+
* Callers pass the clusters from the shipped matcher config.
|
|
17
18
|
*/
|
|
18
19
|
entities: readonly ResolvedEntity[];
|
|
19
20
|
/**
|
|
20
|
-
* The source rows
|
|
21
|
+
* The source rows.
|
|
22
|
+
*
|
|
23
|
+
* The packet reads the authorized official and taxonomy from them.
|
|
21
24
|
*/
|
|
22
25
|
rows: readonly MessyRow[];
|
|
23
26
|
recordCount: number;
|
|
24
27
|
maxNpis: number;
|
|
25
28
|
/**
|
|
26
|
-
* The state the sample was drawn from
|
|
29
|
+
* The state that the sample was drawn from.
|
|
30
|
+
* The packet header prints it.
|
|
27
31
|
*/
|
|
28
32
|
state: string;
|
|
29
33
|
orgNameLabel: TruthLabel;
|
|
30
34
|
}
|
|
31
35
|
/**
|
|
32
|
-
*
|
|
36
|
+
* Writes the adjudication packet and returns the number of over-merged clusters in it.
|
|
33
37
|
*
|
|
34
|
-
* A cluster
|
|
35
|
-
*
|
|
36
|
-
*
|
|
38
|
+
* A cluster is over-merged when its members have more than one org-name truth label.
|
|
39
|
+
* A reviewer marks each cluster as one real entity or as distinct providers.
|
|
40
|
+
* which separates model error from truth-label error.
|
|
37
41
|
*/
|
|
38
|
-
export declare function writeOvermergePacket(path:
|
|
42
|
+
export declare function writeOvermergePacket(path: PathBuilderLike, input: OvermergePacketInput): Promise<number>;
|
|
39
43
|
//# sourceMappingURL=overmerge-packet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overmerge-packet.d.ts","sourceRoot":"","sources":["../../../
|
|
1
|
+
{"version":3,"file":"overmerge-packet.d.ts","sourceRoot":"","sources":["../../../tools/nppes/overmerge-packet.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,QAAQ,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAE3D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;OAGG;IACH,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAA;IACnC;;;;OAIG;IACH,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAA;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,UAAU,CAAA;CACxB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAkD9G"}
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file
|
|
6
|
-
* formatted for human review.
|
|
5
|
+
* @file Writes the over-merged NPPES clusters with every matcher-visible field for human adjudication.
|
|
7
6
|
*/
|
|
8
7
|
import { writeLocalTextFile } from "@mailwoman/core/fs/writers";
|
|
9
|
-
import {
|
|
8
|
+
import { formatPersonName } from "@mailwoman/record/name";
|
|
10
9
|
/**
|
|
11
|
-
*
|
|
10
|
+
* Writes the adjudication packet and returns the number of over-merged clusters in it.
|
|
12
11
|
*
|
|
13
|
-
* A cluster
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* A cluster is over-merged when its members have more than one org-name truth label.
|
|
13
|
+
* A reviewer marks each cluster as one real entity or as distinct providers.
|
|
14
|
+
* which separates model error from truth-label error.
|
|
16
15
|
*/
|
|
17
16
|
export async function writeOvermergePacket(path, input) {
|
|
18
17
|
const { entities, rows, recordCount, maxNpis, state, orgNameLabel } = input;
|
|
@@ -44,7 +43,7 @@ export async function writeOvermergePacket(path, input) {
|
|
|
44
43
|
out.push(`- **entity ${lbl}**`);
|
|
45
44
|
for (const rec of members) {
|
|
46
45
|
const src = rowByID.get(rec.id);
|
|
47
|
-
out.push(` - npi=${rec.id} · name="${
|
|
46
|
+
out.push(` - npi=${rec.id} · name="${formatPersonName(rec.name, "short")}" · org="${rec.organization?.canonical ?? ""}" · addr="${rec.address?.raw ?? ""}" · auth="${src?.auth ?? ""}" · taxonomy="${src?.taxonomy ?? ""}"`);
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
out.push("");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overmerge-packet.js","sourceRoot":"","sources":["../../../
|
|
1
|
+
{"version":3,"file":"overmerge-packet.js","sourceRoot":"","sources":["../../../tools/nppes/overmerge-packet.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAgCzD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAAqB,EAAE,KAA2B;IAC5F,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,KAAK,CAAA;IAC3E,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IAEpD,MAAM,GAAG,GAAa;QACrB,iGAAiG;QACjG,EAAE;QACF,GAAG,KAAK,eAAe,OAAO,MAAM,WAAW,oFAAoF;QACnI,EAAE;QACF,wGAAwG;QACxG,oGAAoG;QACpG,qGAAqG;QACrG,EAAE;KACF,CAAA;IAED,IAAI,CAAC,GAAG,CAAC,CAAA;IAET,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACtB,MAAM,OAAO,GAAG,IAAI,GAAG,EAA0B,CAAA;QAEjD,KAAK,MAAM,GAAG,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;YAC7B,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;YAC7B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;YACnC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACd,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QACvB,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,IAAI,CAAC;YAAE,OAAM;QAE7B,CAAC,EAAE,CAAA;QACH,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,aAAa,OAAO,CAAC,IAAI,oCAAoC,CAAC,CAAA;QAE5G,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,OAAO,EAAE,CAAC;YACtC,GAAG,CAAC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;YAE/B,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;gBAC3B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;gBAE/B,GAAG,CAAC,IAAI,CACP,WAAW,GAAG,CAAC,EAAE,YAAY,gBAAgB,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,GAAG,CAAC,YAAY,EAAE,SAAS,IAAI,EAAE,aAAa,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,aAAa,GAAG,EAAE,IAAI,IAAI,EAAE,iBAAiB,GAAG,EAAE,QAAQ,IAAI,EAAE,GAAG,CACnN,CAAA;YACF,CAAC;QACF,CAAC;QAED,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACb,CAAC,CAAC,CAAA;IAEF,MAAM,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAA;IAE9C,OAAO,CAAC,CAAA;AACT,CAAC"}
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file The NPPES dedup benchmark's markdown report. Pure: every figure comes from the input, because eval figures are
|
|
6
|
-
* never hand-typed into docs.
|
|
7
5
|
*/
|
|
8
6
|
import type { TermFrequencyTable } from "@mailwoman/match";
|
|
9
7
|
import type { ResolveResult } from "#index";
|
|
@@ -20,43 +18,48 @@ export interface SettingScore {
|
|
|
20
18
|
*/
|
|
21
19
|
export interface SweepArm {
|
|
22
20
|
/**
|
|
23
|
-
*
|
|
21
|
+
* The link threshold, in bits.
|
|
24
22
|
*/
|
|
25
23
|
t: number;
|
|
26
24
|
res: Pick<ResolveResult, "candidatePairs" | "droppedBlocks">;
|
|
27
25
|
score: Score;
|
|
28
26
|
}
|
|
29
27
|
/**
|
|
30
|
-
*
|
|
28
|
+
* Inputs consumed by the report.
|
|
31
29
|
*/
|
|
32
30
|
export interface NPPESReportInput {
|
|
33
31
|
state: string;
|
|
34
32
|
/**
|
|
35
|
-
*
|
|
33
|
+
* The number of sampled NPIs.
|
|
34
|
+
* This is the true entity count at the NPI grain.
|
|
36
35
|
*/
|
|
37
36
|
keptNpis: number;
|
|
38
37
|
recordCount: number;
|
|
39
38
|
/**
|
|
40
|
-
*
|
|
39
|
+
* The number of records whose address was placed.
|
|
41
40
|
*/
|
|
42
41
|
geocoded: number;
|
|
43
42
|
trainEM: boolean;
|
|
44
43
|
/**
|
|
45
|
-
* The corpus-wide table
|
|
44
|
+
* The corpus-wide address-frequency table fed to the progression, of
|
|
45
|
+
* which only `total` and `distinct` are reported.
|
|
46
46
|
*/
|
|
47
47
|
addressFrequency: TermFrequencyTable;
|
|
48
48
|
/**
|
|
49
|
-
* The setting progression
|
|
49
|
+
* The setting progression from the bare baseline to the full stack.
|
|
50
|
+
* The report requires at least four rows.
|
|
50
51
|
*/
|
|
51
52
|
progression: readonly SettingScore[];
|
|
52
53
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
54
|
+
* The zero-config `resolveEntities` score, reported apart because its input-scoped
|
|
55
|
+
* frequency table is sparse on a sub-sample.
|
|
55
56
|
*/
|
|
56
57
|
defaultOutOfBox: Score;
|
|
57
58
|
sweep: readonly SweepArm[];
|
|
58
59
|
/**
|
|
59
|
-
* The best-F1 arm.
|
|
60
|
+
* The best-F1 arm.
|
|
61
|
+
*
|
|
62
|
+
* It must be an element of `sweep` because the table marks it by identity.
|
|
60
63
|
*/
|
|
61
64
|
best: SweepArm;
|
|
62
65
|
entityCount: number;
|
|
@@ -73,7 +76,7 @@ export interface NPPESReportInput {
|
|
|
73
76
|
gbtOrgCoord: Score;
|
|
74
77
|
gbtOrgH3: Score;
|
|
75
78
|
/**
|
|
76
|
-
* The optional `--candidate` A/B row.
|
|
79
|
+
* The optional `--candidate` A/B row, or `null` when no candidate was given.
|
|
77
80
|
*/
|
|
78
81
|
candidate: {
|
|
79
82
|
label: string;
|
|
@@ -82,7 +85,8 @@ export interface NPPESReportInput {
|
|
|
82
85
|
} | null;
|
|
83
86
|
h3Res: number;
|
|
84
87
|
/**
|
|
85
|
-
*
|
|
88
|
+
* The number of sampled NPIs whose primary practice address was placed.
|
|
89
|
+
* This bounds what the coordinate grain can act on.
|
|
86
90
|
*/
|
|
87
91
|
geocodedNpis: number;
|
|
88
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../tools/nppes/report.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAE3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAMjD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,KAAK,CAAA;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACxB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT,GAAG,EAAE,IAAI,CAAC,aAAa,EAAE,gBAAgB,GAAG,eAAe,CAAC,CAAA;IAC5D,KAAK,EAAE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
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file The NPPES dedup benchmark's markdown report. Pure: every figure comes from the input, because eval figures are
|
|
6
|
-
* never hand-typed into docs.
|
|
7
5
|
*/
|
|
8
6
|
import { ORG_TAU } from "#tools/nppes/org-name";
|
|
9
7
|
import { COLOCATION_KM } from "#tools/nppes/truth-grains";
|
|
10
8
|
import { pct } from "#tools/shared";
|
|
11
|
-
/**
|
|
12
|
-
* F1 gap within which two blocking strategies are treated as equivalent.
|
|
13
|
-
*/
|
|
14
9
|
const BLOCKING_PARITY_TOLERANCE = 0.015;
|
|
15
10
|
/**
|
|
16
11
|
* Render the run's markdown report.
|
|
17
12
|
*/
|
|
18
13
|
export function renderNPPESDedupReport(input) {
|
|
19
14
|
const { state: STATE, keptNpis, recordCount: N, geocoded: geo, trainEM: TRAIN_EM, addressFrequency, progression, defaultOutOfBox, sweep, best, entityCount, orgCount, orgCoordCount, orgH3Count, fsNPI, fsEntity, fsOrg, fsOrgCoord, gbtNPI, gbtEntity, gbtOrg, gbtOrgCoord, gbtOrgH3, candidate: cand, h3Res: H3_RES, geocodedNpis, } = input;
|
|
20
|
-
const baseline = progression[0];
|
|
21
|
-
// The LAST progression row — the whole A1–A5 stack, never compared on F1 against the others. Named for what it
|
|
22
|
-
// is: a row called `best` invites reading a stack-wide delta as one setting's marginal effect, which is how the
|
|
23
|
-
// authorized-official sentence below came to quote a five-setting number.
|
|
15
|
+
const baseline = progression[0];
|
|
24
16
|
const fullStack = progression.at(-1);
|
|
25
|
-
const base = sweep[0];
|
|
17
|
+
const base = sweep[0];
|
|
26
18
|
const signed = (x) => `${x >= 0 ? "+" : ""}${x.toFixed(1)}pp`;
|
|
27
19
|
const lines = [
|
|
28
20
|
`# NPPES NPI dedup benchmark (#617)`,
|
|
@@ -34,7 +26,7 @@ export function renderNPPESDedupReport(input) {
|
|
|
34
26
|
"",
|
|
35
27
|
`**Headline — org-name truth (the honest grain):** the shipped ` +
|
|
36
28
|
`matcher resolves these records at **F1 ${pct(gbtOrg.f1)}%** against org-name entity-truth — not the NPI-level ` +
|
|
37
|
-
`${pct(gbtNPI.f1)}
|
|
29
|
+
`${pct(gbtNPI.f1)}%. It mostly measures NPI over-segmentation (one organization holds many subpart NPIs. Therefore, ` +
|
|
38
30
|
`correct co-located merges are scored as errors). Same clusters, three rulers: ` +
|
|
39
31
|
`**NPI ${pct(gbtNPI.f1)}% → site ${pct(gbtEntity.f1)}% → org-name ${pct(gbtOrg.f1)}%** ` +
|
|
40
32
|
`(${keptNpis} NPI → ${entityCount} site → ${orgCount} org-name classes); the climb is the yardstick getting honest, ` +
|
|
@@ -64,7 +56,7 @@ export function renderNPPESDedupReport(input) {
|
|
|
64
56
|
`**${pct(defaultOutOfBox.f1)}%** on this sample — essentially the baseline. The default auto-computes the ` +
|
|
65
57
|
`address-frequency table over the INPUT records, and this benchmark deliberately sub-samples ${N} records, so ` +
|
|
66
58
|
`that table is too sparse to carry the inverse-frequency signal (a corpus statistic you can't synthesize from a ` +
|
|
67
|
-
`
|
|
59
|
+
`sample). It's **not a regression**, because it meets the baseline without adding over-merges — it's the honest floor when the input isn't ` +
|
|
68
60
|
`corpus-scale. Fed the corpus-wide table (the \`+ inverse-address-frequency\` row above, what the CLI builds from ` +
|
|
69
61
|
`the full source files) the SAME default reaches the **${pct(progression[2].score.f1)}%** baseline. On a full-dataset ` +
|
|
70
62
|
`dedup the input IS the corpus, so zero-config reaches the baseline on its own.`);
|
|
@@ -80,7 +72,7 @@ export function renderNPPESDedupReport(input) {
|
|
|
80
72
|
lines.push("");
|
|
81
73
|
lines.push(best.t === 0
|
|
82
74
|
? `Best F1 is at the **default threshold** (${pct(base.score.f1)}%): raising it only trades recall away faster ` +
|
|
83
|
-
`than it
|
|
75
|
+
`than it provides precision. So the threshold knob alone can't separate co-located distinct providers — the ` +
|
|
84
76
|
`over-merge is structural, in the comparison model, not the cutoff.`
|
|
85
77
|
: `Best F1 **${pct(best.score.f1)}%** (ARI ${best.score.ari.toFixed(3)}) at threshold ${best.t}, vs **${pct(base.score.f1)}%** at the ` +
|
|
86
78
|
`default — the threshold knob moves it ${(100 * (best.score.f1 - base.score.f1)).toFixed(0)}pp. Higher thresholds trade recall for precision.`);
|
|
@@ -157,7 +149,7 @@ export function renderNPPESDedupReport(input) {
|
|
|
157
149
|
lines.push("");
|
|
158
150
|
lines.push(`Caveats: the programmatic site-truth is CONSERVATIVE (collapses only NPPES-flagged subparts; unflagged same-org pairs still ` +
|
|
159
151
|
`read as over-merge), so it understates the subpart correction. A hand-adjudicated gold set on the ambiguous co-located + ` +
|
|
160
|
-
`two-site
|
|
152
|
+
`two-site stratum is the next refinement (#625).`);
|
|
161
153
|
lines.push("");
|
|
162
154
|
lines.push(`## Reading`);
|
|
163
155
|
lines.push("");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../tools/nppes/report.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAEnC,MAAM,yBAAyB,GAAG,KAAK,CAAA;AA6FvC;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAuB;IAC7D,MAAM,EACL,KAAK,EAAE,KAAK,EACZ,QAAQ,EACR,WAAW,EAAE,CAAC,EACd,QAAQ,EAAE,GAAG,EACb,OAAO,EAAE,QAAQ,EACjB,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,aAAa,EACb,UAAU,EACV,KAAK,EACL,QAAQ,EACR,KAAK,EACL,UAAU,EACV,MAAM,EACN,SAAS,EACT,MAAM,EACN,WAAW,E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