@mailwoman/registry 10.0.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 +11 -6
- 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 +43 -53
- 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 +11 -6
- 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 +17 -41
- 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 +20 -27
- package/out/tools/cross/dataset-correlation.d.ts.map +1 -1
- package/out/tools/cross/dataset-correlation.js +9 -61
- package/out/tools/cross/dataset-correlation.js.map +1 -1
- package/out/tools/cross/source-threshold-sweep.d.ts +20 -26
- package/out/tools/cross/source-threshold-sweep.d.ts.map +1 -1
- package/out/tools/cross/source-threshold-sweep.js +14 -40
- package/out/tools/cross/source-threshold-sweep.js.map +1 -1
- 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 +9 -8
- package/out/tools/geocoder/namesake-probe.d.ts.map +1 -1
- package/out/tools/geocoder/namesake-probe.js +6 -7
- package/out/tools/geocoder/namesake-probe.js.map +1 -1
- package/out/tools/geocoder/vs-provided-coords.d.ts +18 -15
- package/out/tools/geocoder/vs-provided-coords.d.ts.map +1 -1
- package/out/tools/geocoder/vs-provided-coords.js +30 -27
- package/out/tools/geocoder/vs-provided-coords.js.map +1 -1
- 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 +30 -27
- package/out/tools/learned/scorer/clustering-eval.d.ts.map +1 -1
- package/out/tools/learned/scorer/clustering-eval.js +28 -38
- package/out/tools/learned/scorer/clustering-eval.js.map +1 -1
- package/out/tools/learned/scorer/crossstate-eval.d.ts +24 -18
- package/out/tools/learned/scorer/crossstate-eval.d.ts.map +1 -1
- package/out/tools/learned/scorer/crossstate-eval.js +19 -25
- package/out/tools/learned/scorer/crossstate-eval.js.map +1 -1
- package/out/tools/learned/scorer/eval.d.ts +22 -39
- package/out/tools/learned/scorer/eval.d.ts.map +1 -1
- package/out/tools/learned/scorer/eval.js +11 -71
- package/out/tools/learned/scorer/eval.js.map +1 -1
- 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 +21 -41
- package/out/tools/nppes/dedup-benchmark.d.ts.map +1 -1
- package/out/tools/nppes/dedup-benchmark.js +20 -66
- package/out/tools/nppes/dedup-benchmark.js.map +1 -1
- 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 +5 -6
- 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 +36 -26
- package/out/tools/train/cross-gbt.d.ts.map +1 -1
- package/out/tools/train/cross-gbt.js +14 -25
- package/out/tools/train/cross-gbt.js.map +1 -1
- package/out/tools/train/gbt.d.ts +36 -20
- package/out/tools/train/gbt.d.ts.map +1 -1
- package/out/tools/train/gbt.js +27 -31
- package/out/tools/train/gbt.js.map +1 -1
- package/out/tools/train/org-cross-gbt.d.ts +37 -24
- package/out/tools/train/org-cross-gbt.d.ts.map +1 -1
- package/out/tools/train/org-cross-gbt.js +18 -22
- package/out/tools/train/org-cross-gbt.js.map +1 -1
- 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 +5 -5
- package/out/tools/viz/render/map.d.ts.map +1 -1
- package/out/tools/viz/render/map.js +6 -5
- package/out/tools/viz/render/map.js.map +1 -1
- package/out/tools/viz/{render/index.d.ts → render.d.ts} +13 -9
- package/out/tools/viz/render.d.ts.map +1 -0
- package/out/tools/viz/{render/index.js → render.js} +9 -8
- package/out/tools/viz/render.js.map +1 -0
- 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 → tools}/cross/dataset-correlation.ts +31 -72
- package/{lib/tools → 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 → tools}/geocoder/namesake-probe.ts +9 -8
- package/{lib/tools → tools}/geocoder/vs-provided-coords.ts +39 -30
- package/{lib/tools → tools}/gold-set-sample.ts +35 -29
- package/{lib/tools → tools}/learned/scorer/clustering-eval.ts +49 -45
- package/{lib/tools → tools}/learned/scorer/crossstate-eval.ts +34 -30
- package/{lib/tools → tools}/learned/scorer/eval.ts +35 -78
- package/{lib/tools → tools}/matcher-scale.ts +21 -33
- package/{lib/tools → 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 +15 -11
- 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 → tools}/train/cross-gbt.ts +38 -34
- package/{lib/tools → tools}/train/gbt.ts +55 -41
- package/{lib/tools → 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 → tools}/viz/render/map.ts +7 -6
- package/{lib/tools/viz/render/index.ts → 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/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/viz/render/index.d.ts.map +0 -1
- package/out/tools/viz/render/index.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
|
import type { EvalGeocodeStream, EvalGeocoderFactory } from "#tools/eval-geocoder";
|
|
33
12
|
/**
|
|
@@ -35,8 +14,8 @@ import type { EvalGeocodeStream, EvalGeocoderFactory } from "#tools/eval-geocode
|
|
|
35
14
|
*/
|
|
36
15
|
export interface NPPESDedupBenchmarkOptions {
|
|
37
16
|
/**
|
|
38
|
-
* The injected geocoder factory
|
|
39
|
-
* overrides (`--model`/`--tokenizer`/`--model-card`) are
|
|
17
|
+
* The injected geocoder factory, wired by the command to `mailwoman/geocode-core`; model-swap
|
|
18
|
+
* overrides (`--model`/`--tokenizer`/`--model-card`) are its factory config rather than tool options.
|
|
40
19
|
*/
|
|
41
20
|
createGeocoder: EvalGeocoderFactory;
|
|
42
21
|
/**
|
|
@@ -44,47 +23,48 @@ export interface NPPESDedupBenchmarkOptions {
|
|
|
44
23
|
*/
|
|
45
24
|
geocodeStream?: EvalGeocodeStream;
|
|
46
25
|
/**
|
|
47
|
-
* Record-matcher sources directory
|
|
26
|
+
* Record-matcher sources directory, defaulting to `$MAILWOMAN_DATA_ROOT/record-matcher/sources`.
|
|
48
27
|
*/
|
|
49
28
|
sources?: string;
|
|
50
29
|
/**
|
|
51
|
-
* State filter
|
|
30
|
+
* State filter, default TX.
|
|
52
31
|
*/
|
|
53
32
|
state?: string;
|
|
54
33
|
/**
|
|
55
|
-
* NPIs sampled
|
|
34
|
+
* NPIs sampled, default 300.
|
|
56
35
|
*/
|
|
57
36
|
maxNpis?: number;
|
|
58
37
|
/**
|
|
59
|
-
* EM-train the FS arms (label-free)
|
|
38
|
+
* EM-train the FS arms (label-free), default true; `--no-train-em` uses the seeds.
|
|
60
39
|
*/
|
|
61
40
|
trainEm?: boolean;
|
|
62
41
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
42
|
+
* Reproduce the pre-flip ingest (space-joined address columns with `normalizeCase` off),
|
|
43
|
+
* so that with the same data and GBT only the flip is toggled.
|
|
44
|
+
* Default off.
|
|
66
45
|
*/
|
|
67
46
|
legacyJoin?: boolean;
|
|
68
47
|
/**
|
|
69
|
-
* Optional A/B: a path to a trained dedup-gbt TS module
|
|
70
|
-
* the shipped GBT at both truth levels
|
|
48
|
+
* Optional A/B: a path to a trained dedup-gbt TS module exporting DEDUP_GBT_MODEL +
|
|
49
|
+
* DEDUP_GBT_META, scored alongside the shipped GBT at both truth levels.
|
|
71
50
|
*/
|
|
72
51
|
candidate?: string;
|
|
73
52
|
/**
|
|
74
|
-
* Write the
|
|
53
|
+
* Write the gold-set adjudication packet of org-name-grain over-merged clusters here.
|
|
75
54
|
*/
|
|
76
55
|
dumpOvermerges?: string;
|
|
77
56
|
/**
|
|
78
|
-
* H3 resolution for the org-name-h3 truth grain
|
|
57
|
+
* H3 resolution for the org-name-h3 truth grain, default 11 (≈25 m edge).
|
|
79
58
|
*/
|
|
80
59
|
h3Res?: number;
|
|
81
60
|
/**
|
|
82
|
-
* Geocode the sample
|
|
83
|
-
*
|
|
61
|
+
* Geocode the sample through a worker pool with {@linkcode geocodeStream}.
|
|
62
|
+
*
|
|
63
|
+
* The worker pool parallelizes the per-row ONNX parse and WOF SQLite work while preserving coordinates.
|
|
84
64
|
*/
|
|
85
65
|
parallelGeocode?: boolean;
|
|
86
66
|
/**
|
|
87
|
-
* Worker-pool concurrency for {@linkcode parallelGeocode}
|
|
67
|
+
* Worker-pool concurrency for {@linkcode parallelGeocode}, default 2 (geocode is I/O-bound).
|
|
88
68
|
*/
|
|
89
69
|
geoConcurrency?: number;
|
|
90
70
|
/**
|
|
@@ -93,7 +73,7 @@ export interface NPPESDedupBenchmarkOptions {
|
|
|
93
73
|
outMd?: string;
|
|
94
74
|
}
|
|
95
75
|
/**
|
|
96
|
-
* The
|
|
76
|
+
* The NPPES dedup benchmark (see the module doc), emitting the markdown report to stdout.
|
|
97
77
|
*/
|
|
98
78
|
export declare function nppesDedupBenchmark(options: NPPESDedupBenchmarkOptions, report?: (line: string) => void): Promise<{
|
|
99
79
|
markdown: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dedup-benchmark.d.ts","sourceRoot":"","sources":["../../../
|
|
1
|
+
{"version":3,"file":"dedup-benchmark.d.ts","sourceRoot":"","sources":["../../../tools/nppes/dedup-benchmark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAgBH,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAelF;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;;OAGG;IACH,cAAc,EAAE,mBAAmB,CAAA;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAA;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,0BAA0B,EACnC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA4P/B"}
|
|
@@ -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
|
-
// Build the variation-rich sample and 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
|
-
// Score recovered clusters against each truth grain using 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
|
-
// Progressively enable comparison-model settings at the default threshold.
|
|
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
|
-
// Score the same clusters against NPI-level and entity-level truth.
|
|
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)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dedup-benchmark.js","sourceRoot":"","sources":["../../../lib/tools/nppes/dedup-benchmark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;;;;;;;;;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,GAKf,MAAM,QAAQ,CAAA;AAEf,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,EAAE,sBAAsB,EAAiB,MAAM,qBAAqB,CAAA;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAc,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EACN,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,GAEzB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAiE3C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,mBA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Z,CAAC,CAAA;IAEF,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAEf,IAAI,MAAM,EAAE,CAAC;QACZ,MAAM,cAAc,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;QAChC,MAAM,EAAE,CAAC,eAAe,MAAM,EAAE,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAA;AACxB,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
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;
|
|
@@ -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;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,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,KAAK,CAAA;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA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