@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.
Files changed (263) hide show
  1. package/README.md +10 -10
  2. package/lib/address-key.ts +14 -10
  3. package/lib/geocode-handler.ts +6 -4
  4. package/lib/geojson.ts +13 -17
  5. package/lib/ingest.ts +57 -83
  6. package/lib/learned-scorer.ts +38 -44
  7. package/lib/map-html.ts +24 -70
  8. package/lib/models/crosssource-gbt-en-us.ts +9 -7
  9. package/lib/models/dedup-gbt-en-us.ts +9 -8
  10. package/lib/models/org-crosssource-gbt-en-us.ts +10 -8
  11. package/lib/reconcile.ts +45 -55
  12. package/lib/resolve.ts +180 -124
  13. package/lib/types.ts +18 -12
  14. package/out/address-key.d.ts +14 -10
  15. package/out/address-key.d.ts.map +1 -1
  16. package/out/address-key.js +14 -10
  17. package/out/address-key.js.map +1 -1
  18. package/out/geocode-handler.d.ts +6 -4
  19. package/out/geocode-handler.d.ts.map +1 -1
  20. package/out/geocode-handler.js +6 -4
  21. package/out/geocode-handler.js.map +1 -1
  22. package/out/geojson.d.ts +9 -5
  23. package/out/geojson.d.ts.map +1 -1
  24. package/out/geojson.js +13 -15
  25. package/out/geojson.js.map +1 -1
  26. package/out/ingest.d.ts +46 -75
  27. package/out/ingest.d.ts.map +1 -1
  28. package/out/ingest.js +27 -54
  29. package/out/ingest.js.map +1 -1
  30. package/out/learned-scorer.d.ts +29 -26
  31. package/out/learned-scorer.d.ts.map +1 -1
  32. package/out/learned-scorer.js +31 -39
  33. package/out/learned-scorer.js.map +1 -1
  34. package/out/map-html.d.ts +13 -32
  35. package/out/map-html.d.ts.map +1 -1
  36. package/out/map-html.js +9 -62
  37. package/out/map-html.js.map +1 -1
  38. package/out/models/crosssource-gbt-en-us.d.ts +9 -7
  39. package/out/models/crosssource-gbt-en-us.d.ts.map +1 -1
  40. package/out/models/crosssource-gbt-en-us.js +9 -7
  41. package/out/models/crosssource-gbt-en-us.js.map +1 -1
  42. package/out/models/dedup-gbt-en-us.d.ts +9 -8
  43. package/out/models/dedup-gbt-en-us.d.ts.map +1 -1
  44. package/out/models/dedup-gbt-en-us.js +9 -8
  45. package/out/models/dedup-gbt-en-us.js.map +1 -1
  46. package/out/models/org-crosssource-gbt-en-us.d.ts +10 -8
  47. package/out/models/org-crosssource-gbt-en-us.d.ts.map +1 -1
  48. package/out/models/org-crosssource-gbt-en-us.js +10 -8
  49. package/out/models/org-crosssource-gbt-en-us.js.map +1 -1
  50. package/out/reconcile.d.ts +35 -50
  51. package/out/reconcile.d.ts.map +1 -1
  52. package/out/reconcile.js +19 -43
  53. package/out/reconcile.js.map +1 -1
  54. package/out/resolve.d.ts +150 -90
  55. package/out/resolve.d.ts.map +1 -1
  56. package/out/resolve.js +62 -63
  57. package/out/resolve.js.map +1 -1
  58. package/out/tools/coverage-reconciliation.d.ts +23 -23
  59. package/out/tools/coverage-reconciliation.d.ts.map +1 -1
  60. package/out/tools/coverage-reconciliation.js +15 -26
  61. package/out/tools/coverage-reconciliation.js.map +1 -1
  62. package/out/tools/cross/dataset-correlation.d.ts +58 -0
  63. package/out/tools/cross/dataset-correlation.d.ts.map +1 -0
  64. package/out/tools/{cross-dataset-correlation.js → cross/dataset-correlation.js} +10 -62
  65. package/out/tools/cross/dataset-correlation.js.map +1 -0
  66. package/out/tools/cross/source-threshold-sweep.d.ts +60 -0
  67. package/out/tools/cross/source-threshold-sweep.d.ts.map +1 -0
  68. package/out/tools/{cross-source-threshold-sweep.js → cross/source-threshold-sweep.js} +15 -41
  69. package/out/tools/cross/source-threshold-sweep.js.map +1 -0
  70. package/out/tools/dedup-ceiling.d.ts +23 -26
  71. package/out/tools/dedup-ceiling.d.ts.map +1 -1
  72. package/out/tools/dedup-ceiling.js +22 -41
  73. package/out/tools/dedup-ceiling.js.map +1 -1
  74. package/out/tools/eval-geocoder.d.ts +22 -15
  75. package/out/tools/eval-geocoder.d.ts.map +1 -1
  76. package/out/tools/eval-geocoder.js +5 -6
  77. package/out/tools/eval-geocoder.js.map +1 -1
  78. package/out/tools/geocoder/namesake-probe.d.ts +33 -0
  79. package/out/tools/geocoder/namesake-probe.d.ts.map +1 -0
  80. package/out/tools/{geocoder-namesake-probe.js → geocoder/namesake-probe.js} +7 -8
  81. package/out/tools/geocoder/namesake-probe.js.map +1 -0
  82. package/out/tools/geocoder/vs-provided-coords.d.ts +53 -0
  83. package/out/tools/geocoder/vs-provided-coords.d.ts.map +1 -0
  84. package/out/tools/{geocoder-vs-provided-coords.js → geocoder/vs-provided-coords.js} +31 -28
  85. package/out/tools/geocoder/vs-provided-coords.js.map +1 -0
  86. package/out/tools/gold-set-sample.d.ts +27 -18
  87. package/out/tools/gold-set-sample.d.ts.map +1 -1
  88. package/out/tools/gold-set-sample.js +18 -22
  89. package/out/tools/gold-set-sample.js.map +1 -1
  90. package/out/tools/learned/scorer/clustering-eval.d.ts +77 -0
  91. package/out/tools/learned/scorer/clustering-eval.d.ts.map +1 -0
  92. package/out/tools/{learned-scorer-clustering-eval.js → learned/scorer/clustering-eval.js} +29 -39
  93. package/out/tools/learned/scorer/clustering-eval.js.map +1 -0
  94. package/out/tools/learned/scorer/crossstate-eval.d.ts +65 -0
  95. package/out/tools/learned/scorer/crossstate-eval.d.ts.map +1 -0
  96. package/out/tools/{learned-scorer-crossstate-eval.js → learned/scorer/crossstate-eval.js} +20 -26
  97. package/out/tools/learned/scorer/crossstate-eval.js.map +1 -0
  98. package/out/tools/learned/scorer/eval.d.ts +60 -0
  99. package/out/tools/learned/scorer/eval.d.ts.map +1 -0
  100. package/out/tools/{learned-scorer-eval.js → learned/scorer/eval.js} +12 -72
  101. package/out/tools/learned/scorer/eval.js.map +1 -0
  102. package/out/tools/matcher-scale.d.ts +12 -17
  103. package/out/tools/matcher-scale.d.ts.map +1 -1
  104. package/out/tools/matcher-scale.js +11 -29
  105. package/out/tools/matcher-scale.js.map +1 -1
  106. package/out/tools/nppes/dedup-benchmark.d.ts +81 -0
  107. package/out/tools/nppes/dedup-benchmark.d.ts.map +1 -0
  108. package/out/tools/{nppes-dedup-benchmark.js → nppes/dedup-benchmark.js} +21 -67
  109. package/out/tools/nppes/dedup-benchmark.js.map +1 -0
  110. package/out/tools/nppes/org-name.d.ts +5 -4
  111. package/out/tools/nppes/org-name.d.ts.map +1 -1
  112. package/out/tools/nppes/org-name.js +2 -2
  113. package/out/tools/nppes/org-name.js.map +1 -1
  114. package/out/tools/nppes/overmerge-packet.d.ts +15 -11
  115. package/out/tools/nppes/overmerge-packet.d.ts.map +1 -1
  116. package/out/tools/nppes/overmerge-packet.js +7 -8
  117. package/out/tools/nppes/overmerge-packet.js.map +1 -1
  118. package/out/tools/nppes/report.d.ts +17 -13
  119. package/out/tools/nppes/report.d.ts.map +1 -1
  120. package/out/tools/nppes/report.js +6 -14
  121. package/out/tools/nppes/report.js.map +1 -1
  122. package/out/tools/nppes/sample.d.ts +28 -17
  123. package/out/tools/nppes/sample.d.ts.map +1 -1
  124. package/out/tools/nppes/sample.js +23 -26
  125. package/out/tools/nppes/sample.js.map +1 -1
  126. package/out/tools/nppes/scoring.d.ts +7 -6
  127. package/out/tools/nppes/scoring.d.ts.map +1 -1
  128. package/out/tools/nppes/scoring.js +6 -5
  129. package/out/tools/nppes/scoring.js.map +1 -1
  130. package/out/tools/nppes/settings.d.ts +10 -7
  131. package/out/tools/nppes/settings.d.ts.map +1 -1
  132. package/out/tools/nppes/settings.js +16 -16
  133. package/out/tools/nppes/settings.js.map +1 -1
  134. package/out/tools/nppes/truth-grains.d.ts +36 -23
  135. package/out/tools/nppes/truth-grains.d.ts.map +1 -1
  136. package/out/tools/nppes/truth-grains.js +36 -20
  137. package/out/tools/nppes/truth-grains.js.map +1 -1
  138. package/out/tools/shared.d.ts +63 -59
  139. package/out/tools/shared.d.ts.map +1 -1
  140. package/out/tools/shared.js +49 -66
  141. package/out/tools/shared.js.map +1 -1
  142. package/out/tools/train/cross-gbt.d.ts +88 -0
  143. package/out/tools/train/cross-gbt.d.ts.map +1 -0
  144. package/out/tools/{train-cross-gbt.js → train/cross-gbt.js} +15 -26
  145. package/out/tools/train/cross-gbt.js.map +1 -0
  146. package/out/tools/train/gbt.d.ts +85 -0
  147. package/out/tools/train/gbt.d.ts.map +1 -0
  148. package/out/tools/{train-gbt.js → train/gbt.js} +28 -32
  149. package/out/tools/train/gbt.js.map +1 -0
  150. package/out/tools/train/org-cross-gbt.d.ts +84 -0
  151. package/out/tools/train/org-cross-gbt.d.ts.map +1 -0
  152. package/out/tools/{train-org-cross-gbt.js → train/org-cross-gbt.js} +19 -23
  153. package/out/tools/train/org-cross-gbt.js.map +1 -0
  154. package/out/tools/txhhsc-to-oarow.d.ts +14 -9
  155. package/out/tools/txhhsc-to-oarow.d.ts.map +1 -1
  156. package/out/tools/txhhsc-to-oarow.js +16 -15
  157. package/out/tools/txhhsc-to-oarow.js.map +1 -1
  158. package/out/tools/viz/browser.d.ts +6 -5
  159. package/out/tools/viz/browser.d.ts.map +1 -1
  160. package/out/tools/viz/browser.js +6 -5
  161. package/out/tools/viz/browser.js.map +1 -1
  162. package/out/tools/viz/cross-dataset-map.d.ts +7 -4
  163. package/out/tools/viz/cross-dataset-map.d.ts.map +1 -1
  164. package/out/tools/viz/cross-dataset-map.js +9 -6
  165. package/out/tools/viz/cross-dataset-map.js.map +1 -1
  166. package/out/tools/viz/geocode-first-surface.d.ts +10 -5
  167. package/out/tools/viz/geocode-first-surface.d.ts.map +1 -1
  168. package/out/tools/viz/geocode-first-surface.js +16 -11
  169. package/out/tools/viz/geocode-first-surface.js.map +1 -1
  170. package/out/tools/viz/{render-map.d.ts → render/map.d.ts} +6 -6
  171. package/out/tools/viz/render/map.d.ts.map +1 -0
  172. package/out/tools/viz/{render-map.js → render/map.js} +7 -6
  173. package/out/tools/viz/render/map.js.map +1 -0
  174. package/out/tools/viz/render.d.ts +12 -8
  175. package/out/tools/viz/render.d.ts.map +1 -1
  176. package/out/tools/viz/render.js +8 -7
  177. package/out/tools/viz/render.js.map +1 -1
  178. package/out/tools/viz/source-provenance-map.d.ts +19 -7
  179. package/out/tools/viz/source-provenance-map.d.ts.map +1 -1
  180. package/out/tools/viz/source-provenance-map.js +11 -8
  181. package/out/tools/viz/source-provenance-map.js.map +1 -1
  182. package/out/tools/viz/yardstick-figure.d.ts +2 -21
  183. package/out/tools/viz/yardstick-figure.d.ts.map +1 -1
  184. package/out/tools/viz/yardstick-figure.js +3 -39
  185. package/out/tools/viz/yardstick-figure.js.map +1 -1
  186. package/out/types.d.ts +17 -11
  187. package/out/types.d.ts.map +1 -1
  188. package/out/types.js +2 -2
  189. package/out/types.js.map +1 -1
  190. package/package.json +41 -184
  191. package/{lib/tools → tools}/coverage-reconciliation.ts +27 -30
  192. package/{lib/tools/cross-dataset-correlation.ts → tools/cross/dataset-correlation.ts} +31 -72
  193. package/{lib/tools/cross-source-threshold-sweep.ts → tools/cross/source-threshold-sweep.ts} +29 -46
  194. package/{lib/tools → tools}/dedup-ceiling.ts +34 -45
  195. package/tools/eval-geocoder.ts +74 -0
  196. package/{lib/tools/geocoder-namesake-probe.ts → tools/geocoder/namesake-probe.ts} +9 -8
  197. package/{lib/tools/geocoder-vs-provided-coords.ts → tools/geocoder/vs-provided-coords.ts} +39 -30
  198. package/{lib/tools → tools}/gold-set-sample.ts +35 -29
  199. package/{lib/tools/learned-scorer-clustering-eval.ts → tools/learned/scorer/clustering-eval.ts} +49 -45
  200. package/{lib/tools/learned-scorer-crossstate-eval.ts → tools/learned/scorer/crossstate-eval.ts} +34 -30
  201. package/{lib/tools/learned-scorer-eval.ts → tools/learned/scorer/eval.ts} +35 -78
  202. package/{lib/tools → tools}/matcher-scale.ts +21 -33
  203. package/{lib/tools/nppes-dedup-benchmark.ts → tools/nppes/dedup-benchmark.ts} +37 -82
  204. package/{lib/tools → tools}/nppes/org-name.ts +5 -4
  205. package/{lib/tools → tools}/nppes/overmerge-packet.ts +17 -13
  206. package/{lib/tools → tools}/nppes/report.ts +32 -25
  207. package/{lib/tools → tools}/nppes/sample.ts +41 -36
  208. package/{lib/tools → tools}/nppes/scoring.ts +7 -6
  209. package/{lib/tools → tools}/nppes/settings.ts +16 -16
  210. package/{lib/tools → tools}/nppes/truth-grains.ts +46 -26
  211. package/{lib/tools → tools}/shared.ts +73 -83
  212. package/{lib/tools/train-cross-gbt.ts → tools/train/cross-gbt.ts} +38 -34
  213. package/{lib/tools/train-gbt.ts → tools/train/gbt.ts} +55 -41
  214. package/{lib/tools/train-org-cross-gbt.ts → tools/train/org-cross-gbt.ts} +39 -30
  215. package/{lib/tools → tools}/txhhsc-to-oarow.ts +24 -18
  216. package/{lib/tools → tools}/viz/browser.ts +6 -5
  217. package/{lib/tools → tools}/viz/cross-dataset-map.ts +15 -9
  218. package/{lib/tools → tools}/viz/geocode-first-surface.ts +28 -17
  219. package/{lib/tools/viz/render-map.ts → tools/viz/render/map.ts} +7 -6
  220. package/{lib/tools → tools}/viz/render.ts +16 -11
  221. package/{lib/tools → tools}/viz/source-provenance-map.ts +30 -15
  222. package/{lib/tools → tools}/viz/yardstick-figure.ts +6 -43
  223. package/lib/tools/eval-geocoder.ts +0 -67
  224. package/lib/tools/index.ts +0 -31
  225. package/out/tools/cross-dataset-correlation.d.ts +0 -65
  226. package/out/tools/cross-dataset-correlation.d.ts.map +0 -1
  227. package/out/tools/cross-dataset-correlation.js.map +0 -1
  228. package/out/tools/cross-source-threshold-sweep.d.ts +0 -66
  229. package/out/tools/cross-source-threshold-sweep.d.ts.map +0 -1
  230. package/out/tools/cross-source-threshold-sweep.js.map +0 -1
  231. package/out/tools/geocoder-namesake-probe.d.ts +0 -32
  232. package/out/tools/geocoder-namesake-probe.d.ts.map +0 -1
  233. package/out/tools/geocoder-namesake-probe.js.map +0 -1
  234. package/out/tools/geocoder-vs-provided-coords.d.ts +0 -50
  235. package/out/tools/geocoder-vs-provided-coords.d.ts.map +0 -1
  236. package/out/tools/geocoder-vs-provided-coords.js.map +0 -1
  237. package/out/tools/index.d.ts +0 -31
  238. package/out/tools/index.d.ts.map +0 -1
  239. package/out/tools/index.js +0 -31
  240. package/out/tools/index.js.map +0 -1
  241. package/out/tools/learned-scorer-clustering-eval.d.ts +0 -74
  242. package/out/tools/learned-scorer-clustering-eval.d.ts.map +0 -1
  243. package/out/tools/learned-scorer-clustering-eval.js.map +0 -1
  244. package/out/tools/learned-scorer-crossstate-eval.d.ts +0 -59
  245. package/out/tools/learned-scorer-crossstate-eval.d.ts.map +0 -1
  246. package/out/tools/learned-scorer-crossstate-eval.js.map +0 -1
  247. package/out/tools/learned-scorer-eval.d.ts +0 -77
  248. package/out/tools/learned-scorer-eval.d.ts.map +0 -1
  249. package/out/tools/learned-scorer-eval.js.map +0 -1
  250. package/out/tools/nppes-dedup-benchmark.d.ts +0 -101
  251. package/out/tools/nppes-dedup-benchmark.d.ts.map +0 -1
  252. package/out/tools/nppes-dedup-benchmark.js.map +0 -1
  253. package/out/tools/train-cross-gbt.d.ts +0 -78
  254. package/out/tools/train-cross-gbt.d.ts.map +0 -1
  255. package/out/tools/train-cross-gbt.js.map +0 -1
  256. package/out/tools/train-gbt.d.ts +0 -69
  257. package/out/tools/train-gbt.d.ts.map +0 -1
  258. package/out/tools/train-gbt.js.map +0 -1
  259. package/out/tools/train-org-cross-gbt.d.ts +0 -71
  260. package/out/tools/train-org-cross-gbt.d.ts.map +0 -1
  261. package/out/tools/train-org-cross-gbt.js.map +0 -1
  262. package/out/tools/viz/render-map.d.ts.map +0 -1
  263. package/out/tools/viz/render-map.js.map +0 -1
@@ -2,8 +2,8 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- * @file The org-name entity-truth grains: union-find labellings that collapse co-located same-org NPIs, keyed three
6
- * ways — the address string, a haversine co-location radius, and an H3 cell.
5
+ * @file Defines union-find truth labels that group co-located NPIs for one organization.
6
+ * One label uses address strings. Another uses a haversine radius. The third uses H3 cells.
7
7
  */
8
8
  import { createUnionFind } from "@mailwoman/core/utils";
9
9
  import { haversineKm, jaccard } from "@mailwoman/match";
@@ -16,8 +16,11 @@ export const COLOCATION_KM = 0.05;
16
16
  /**
17
17
  * Union every pair in each block whose org names agree.
18
18
  *
19
- * Quadratic within a block, which is what keeps the test honest: the Jaccard test is per PAIR, so a chain of
20
- * near-matches cannot transitively fuse two genuinely distinct co-located orgs unless some pair actually agrees.
19
+ * Checks every pair within a block.
20
+ * This preserves the per-pair Jaccard test.
21
+ *
22
+ * Therefore, a chain of near-matches cannot transitively fuse two genuinely distinct
23
+ * co-located orgs unless some pair actually agrees.
21
24
  */
22
25
  function unionAgreeingPairs(blocks, npiPrimary, uf) {
23
26
  for (const group of blocks) {
@@ -31,8 +34,10 @@ function unionAgreeingPairs(blocks, npiPrimary, uf) {
31
34
  }
32
35
  }
33
36
  /**
34
- * An NPI's primary practice coordinate — the FIRST geocoded record it owns, which is its primary row because the sample
35
- * builder pushes that row before the alternate-name and mailing variants.
37
+ * An NPI's primary practice coordinate.
38
+ *
39
+ * Returns the first geocoded record for the NPI.
40
+ * The sample builder adds this primary row before alternate-name and mailing variants.
36
41
  */
37
42
  export function collectPrimaryCoordinates(records) {
38
43
  const npiCoord = new Map();
@@ -45,12 +50,17 @@ export function collectPrimaryCoordinates(records) {
45
50
  return npiCoord;
46
51
  }
47
52
  /**
48
- * The string-keyed org-name truth: same NPI ⇒ same entity (so an NPI's records stay together and recall is preserved),
49
- * PLUS union two NPIs at the same address KEY whose primary org names agree.
53
+ * The string-keyed org-name truth: same NPI ⇒ same entity
54
+ * (so an NPI's records stay together and recall is preserved), plus union two NPIs
55
+ * at the same address KEY whose primary org names agree.
56
+ *
57
+ * The address-string block provides a conservative lower bound.
58
+ * `1504 Taub loop` and `1504 Taub LP STE 100` key apart even though they are one building,
59
+ * so a correct merge across them is still charged as an error.
60
+ * The coordinate grain below is the tighter reading.
50
61
  *
51
- * Blocking on the address string is a conservative LOWER bound — `1504 Taub LOOP` and `1504 Taub LP STE 100` key apart
52
- * even though they are one building, so a correct merge across them is still charged as an error. The coordinate grain
53
- * below is the tighter reading. Neither relies on the NPPES subpart flag, which the gold set showed misses 37%.
62
+ * Neither method uses the NPPES subpart flag.
63
+ * The gold set misses 37% of cases when grouped by that flag.
54
64
  */
55
65
  export function buildOrgNameGrain(npiPrimary) {
56
66
  const uf = createUnionFind();
@@ -69,12 +79,15 @@ export function buildOrgNameGrain(npiPrimary) {
69
79
  return (rec) => (npiPrimary.has(rec.id) ? uf.find(rec.id) : rec.id);
70
80
  }
71
81
  /**
72
- * The coordinate-keyed org-name truth: union same-org NPIs whose primary practice coordinates fall within
73
- * {@linkcode COLOCATION_KM}. Blocking by the GEOCODED BUILDING catches the same-building pairs the address string keys
74
- * apart, so this F1 is at or above the string grain's; the Jaccard test still blocks distinct co-located orgs.
82
+ * The coordinate-keyed org-name truth: union same-org NPIs whose primary practice
83
+ * coordinates fall within {@linkcode COLOCATION_KM}.
75
84
  *
76
- * Brute-force pairwise over the sampled NPIs — trivial at this scale, and unlike a cell key it has no boundary
77
- * artifact.
85
+ * A geocoded-building block catches same-building pairs that the address string keys apart,
86
+ * so this F1 is at or above the string grain's.
87
+ * The Jaccard test still blocks distinct co-located orgs.
88
+ *
89
+ * Compares every sampled NPI pair.
90
+ * This is small enough for the sample and has no cell-boundary artifact.
78
91
  */
79
92
  export function buildOrgNameCoordGrain(npiPrimary, npiCoord) {
80
93
  const uf = createUnionFind();
@@ -97,11 +110,14 @@ export function buildOrgNameCoordGrain(npiPrimary, npiCoord) {
97
110
  return (rec) => (npiPrimary.has(rec.id) ? uf.find(rec.id) : rec.id);
98
111
  }
99
112
  /**
100
- * The H3-cell org-name truth — the same building grain keyed on a cell instead of a radius, so co-location blocking is
101
- * O(n) rather than O(n²).
113
+ * The H3-cell org-name truth.
114
+ *
115
+ * The same building grain keyed on a cell instead of a radius, so co-location
116
+ * blocking is O(n) rather than O(n²).
102
117
  *
103
- * A robustness check on the coordinate grain, not a replacement: a hard cell boundary can split a same-building pair
104
- * into adjacent cells, so this slightly UNDER-counts relative to the radius. Coarser resolutions absorb more of that.
118
+ * A robustness check on the coordinate grain rather than a replacement: a hard cell boundary can split
119
+ * a same-building pair into adjacent cells, so this slightly under-counts relative to the radius.
120
+ * Coarser resolutions absorb more of that.
105
121
  */
106
122
  export function buildOrgNameH3Grain(npiPrimary, npiCoord, h3Res) {
107
123
  const uf = createUnionFind();
@@ -1 +1 @@
1
- {"version":3,"file":"truth-grains.js","sourceRoot":"","sources":["../../../lib/tools/nppes/truth-grains.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAkB,MAAM,uBAAuB,CAAA;AACvE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAe,MAAM,kBAAkB,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAGpC,OAAO,EAAE,OAAO,EAAmB,MAAM,uBAAuB,CAAA;AAEhE;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAA;AAOjC;;;;;GAKG;AACH,SAAS,kBAAkB,CAC1B,MAAmC,EACnC,UAAmC,EACnC,EAAa;IAEb,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC3C,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAE,CAAE,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAE,CAAE,CAAC,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;oBAC9F,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAE,EAAE,KAAK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,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;AACpE,CAAC"}
@@ -3,17 +3,17 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Shared helpers for the `registry/tools` probe battery.
7
- *
8
- * The rule: anything reused by two or more probes belongs here; anything a single probe needs
9
- * stays with that probe.
6
+ * Shared helpers used by two or more probes in the `registry/tools` probe battery.
10
7
  */
11
8
  import { type TermFrequencyTable } from "@mailwoman/match";
12
9
  import { type ColumnMapping } from "#index";
13
10
  import type { EvalGeocoderFactory } from "#tools/eval-geocoder";
14
11
  import type { Score } from "#tools/nppes/scoring";
15
12
  /**
16
- * One source a cross-source probe ingests: where it lives, the column mapping, and an in-state filter.
13
+ * One source a cross-source probe ingests.
14
+ *
15
+ * Its spec gives the path and column mapping.
16
+ * The spec also provides an in-state filter.
17
17
  */
18
18
  export interface SourceSpec {
19
19
  source: string;
@@ -24,7 +24,8 @@ export interface SourceSpec {
24
24
  */
25
25
  inState: (row: Record<string, string>) => boolean;
26
26
  /**
27
- * Optional: a row carries ≥1 addressable entity — yield each as its own row. Default identity.
27
+ * Optional: a row carrying ≥1 addressable entity yields each as its own row.
28
+ * Default identity.
28
29
  */
29
30
  explode?: (row: Record<string, string>) => Record<string, string>[];
30
31
  }
@@ -33,11 +34,8 @@ export interface SourceSpec {
33
34
  */
34
35
  export declare const norm: (s: string | undefined) => string;
35
36
  /**
36
- * The token set of an organization name: lower-cased, non-alphanumerics folded to spaces, stop words removed.
37
- *
38
- * NOT a canonical form — `@mailwoman/record`'s `canonicalizeOrganizationName` is the stronger canonical key
39
- * (jurisdiction-aware designation stripping, a DBA split). This set serves the probes' cheap Jaccard overlap over raw
40
- * registry names, never blocking or display.
37
+ * The token set of an organization name for the probes' cheap Jaccard overlap,
38
+ * never blocking or display — not a canonical form.
41
39
  */
42
40
  export declare function orgTokens(s: string): Set<string>;
43
41
  /**
@@ -45,17 +43,23 @@ export declare function orgTokens(s: string): Set<string>;
45
43
  */
46
44
  export declare const addr: (line: string, city: string, st: string, zip: string) => string;
47
45
  /**
48
- * Population standard deviation; `0` on an empty sample, because these feed report tables that print a number per row.
46
+ * Population standard deviation; `0` on an empty sample, because these feed
47
+ * report tables that print a number per row.
49
48
  */
50
49
  export declare const std: (xs: readonly number[]) => number;
50
+ /**
51
+ * Takes a fraction and omits the percent sign, unlike core `formatPercent`'s
52
+ * numerator/denominator interface.
53
+ * Call sites append their own `%`.
54
+ */
51
55
  export declare const pct: (x: number) => string;
52
56
  /**
53
- * Sign prefix for a signed delta — `"+"` for a non-negative value (a negative one carries its own sign).
57
+ * Sign prefix for a signed delta: `"+"` for a non-negative value, since a negative one includes its sign.
54
58
  */
55
59
  export declare const sgn: (x: number) => string;
56
60
  /**
57
- * Logistic function with the input clamped to +/-30 — past that `Math.exp` underflows to 0 and the gradient step
58
- * silently becomes a no-op.
61
+ * Logistic function with the input clamped to ±30, past which `Math.exp` underflows to 0
62
+ * and the gradient step silently becomes a no-op.
59
63
  */
60
64
  export declare const sigmoid: (z: number) => number;
61
65
  /**
@@ -78,14 +82,8 @@ export declare const TX_BBOX: {
78
82
  */
79
83
  export declare const inTXBBOX: (lat: number, lon: number) => boolean;
80
84
  /**
81
- * NPPES registry column headers, by the short name the probes read them under.
82
- *
83
- * The NPI registry export is a ~330-column TSV with headers this long, so every probe that touches it needs this map,
84
- * and five of them had grown their own copy. The copies were a NESTED SUPERSET chain, not a disagreement -- each new
85
- * probe took the previous one's map and appended what it additionally read -- so this is the widest of the five, and no
86
- * consumer loses a column. Reading extra keys costs nothing: they are inert strings, and nothing enumerates this object
87
- * (checked: no `Object.keys`/`values`/`entries`/spread over it anywhere in `tools/`), so adding a column can never
88
- * change a probe's behavior.
85
+ * NPPES registry column headers, by the short name the probes read them under. no code
86
+ * enumerates this object, so adding a column cannot change a probe's behavior.
89
87
  */
90
88
  export declare const NPPES_COLUMNS: {
91
89
  npi: string;
@@ -115,12 +113,13 @@ export declare const NPPES_COLUMNS: {
115
113
  */
116
114
  export declare const MIN_GROUP_SIZE = 5;
117
115
  /**
118
- * Gradient-descent epochs for {@link trainLogisticRegression}. Fixed rather than early-stopped so seeds stay comparable.
116
+ * Gradient-descent epochs for {@link trainLogisticRegression}, fixed
117
+ * rather than early-stopped so seeds stay comparable.
119
118
  */
120
119
  export declare const TRAINING_EPOCHS = 400;
121
120
  /**
122
- * Smallest mean F1 gap counted as a real difference between models rather than seed noise. Verdicts inside ±this are
123
- * reported as a tie.
121
+ * Smallest mean F1 gap counted as a real difference between models rather than seed
122
+ * noise. verdicts inside ±this are reported as a tie.
124
123
  */
125
124
  export declare const MIN_MEANINGFUL_F1_DELTA = 0.02;
126
125
  /**
@@ -132,20 +131,22 @@ export declare const LR_LEARNING_RATE = 0.1;
132
131
  */
133
132
  export declare const LR_L2 = 0.001;
134
133
  /**
135
- * L2-regularized logistic regression by batch gradient descent ({@link TRAINING_EPOCHS} epochs) — the probes' linear
136
- * arm. `w` carries the per-sample class weights (the caller up-weights the rare class). Returns the linear scorer: the
137
- * logit, not the probability, threshold-comparable across a fixed feature layout.
134
+ * L2-regularized logistic regression by batch gradient descent over {@link TRAINING_EPOCHS}
135
+ * epochs, where `w` stores per-sample class weights, returning the logit rather than
136
+ * the probability so it is threshold-comparable across a fixed feature layout.
138
137
  */
139
138
  export declare function trainLogisticRegression(X: readonly (readonly number[])[], y: readonly number[], w: readonly number[], dim: number): (x: readonly number[]) => number;
140
139
  /**
141
- * `n + 1` evenly-spaced order statistics of an already-sorted sample, de-duplicated — the candidate split thresholds a
142
- * GBT node considers. `[0]` for an empty sample so a degenerate feature still yields one (useless but well-formed)
143
- * threshold rather than an empty split set.
140
+ * `n + 1` evenly-spaced order statistics of an already-sorted sample, de-duplicated,
141
+ * that a GBT node considers as candidate splits.
142
+ *
143
+ * An empty sample yields `[0]` so a degenerate feature still yields one threshold
144
+ * rather than an empty split set.
144
145
  */
145
146
  export declare function uniqueQuantiles(sorted: readonly number[], n: number): number[];
146
147
  /**
147
- * Link-threshold candidates for a learned scorer: de-duplicated quantiles of the scorer's own eval-pair score
148
- * distribution across the 0.2–0.999 quantile band — fine enough that a coarse grid can't understate an arm.
148
+ * Link-threshold candidates for a learned scorer: de-duplicated quantiles of the
149
+ * scorer's own eval-pair score distribution across the 0.2–0.999 band.
149
150
  */
150
151
  export declare const quantileThresholds: (scores: readonly number[]) => number[];
151
152
  /**
@@ -166,19 +167,18 @@ export declare const toArmScore: (s: Score) => ArmScore;
166
167
  */
167
168
  export declare function bestOver(thresholds: readonly number[], scoreAt: (threshold: number) => ArmScore): ArmScore;
168
169
  /**
169
- * One organization provider at its practice address, as the geocode-free co-location probes read it — the union of what
170
- * `dedup-ceiling` and `gold-set-sample` each collect.
170
+ * One organization provider at its practice address, as the geocode-free co-location probes read it.
171
171
  */
172
172
  export interface ColocatedProvider {
173
173
  npi: string;
174
174
  org: string;
175
175
  tokens: Set<string>;
176
176
  /**
177
- * The composed practice address ({@link addr}), the string the adjudication packets carry.
177
+ * The composed practice address ({@link addr}).
178
178
  */
179
179
  address: string;
180
180
  /**
181
- * Strict last-10-digit phone key; `""` when the column carries fewer than 10 digits.
181
+ * Strict last-10-digit phone key; `""` when the column contains fewer than 10 digits.
182
182
  */
183
183
  phone: string;
184
184
  /**
@@ -191,7 +191,7 @@ export interface ColocatedProvider {
191
191
  taxonomy: string;
192
192
  subpart: boolean;
193
193
  /**
194
- * `parentLBN|parentTIN`, lowercased — `"|"` when both are blank.
194
+ * `parentLBN|parentTIN`, lowercased; `"|"` when both are blank.
195
195
  */
196
196
  parent: string;
197
197
  }
@@ -207,8 +207,9 @@ export interface ColocatedScan {
207
207
  scanned: number;
208
208
  }
209
209
  /**
210
- * Stream in-state type-2 (organization) providers from the registry — one record per row at its practice address,
211
- * grouped by `addressFrequencyKey`. Geocode-free on purpose, so it runs at large caps in seconds.
210
+ * Stream in-state type-2 (organization) providers from the registry,
211
+ * one record per row at its practice address, grouped by `addressFrequencyKey`;
212
+ * geocode-free on purpose so it runs at large caps in seconds.
212
213
  */
213
214
  export declare function scanColocatedProviders(options: {
214
215
  registryPath: string;
@@ -222,19 +223,18 @@ export interface ColocatedPair {
222
223
  a: ColocatedProvider;
223
224
  b: ColocatedProvider;
224
225
  /**
225
- * The distinct-NPI providers at the shared address, length ≥ 2. One array reference per group, so a consumer tracking
226
- * group-level tallies can detect the group boundary by identity.
226
+ * The distinct-NPI providers at the shared address, length ≥ 2, one array reference
227
+ * per group so a consumer can detect the group boundary by identity.
227
228
  */
228
229
  group: readonly ColocatedProvider[];
229
230
  }
230
231
  /**
231
- * Every unordered pair of DISTINCT NPIs sharing a practice-address key — the over-merge population. Providers are
232
- * de-duplicated per address by NPI (first record wins); single-NPI addresses yield nothing.
232
+ * Every unordered pair of distinct NPIs sharing a practice-address key, de-duplicated
233
+ * per address by NPI (first record wins) so single-NPI addresses yield no pair.
233
234
  */
234
235
  export declare function colocatedDistinctPairs(byAddr: ReadonlyMap<string, readonly ColocatedProvider[]>): Generator<ColocatedPair>;
235
236
  /**
236
- * The TX facility source specs the cross-source probes share. `cross-dataset-correlation` composes these with its own
237
- * commitments spec (the exploded two-entity-per-row source).
237
+ * The TX facility source specs the cross-source probes share.
238
238
  */
239
239
  export declare const buildSpecs: (S: string, STATE: string) => SourceSpec[];
240
240
  /**
@@ -247,8 +247,10 @@ export interface GBTHyperparameters {
247
247
  minLeaf: number;
248
248
  }
249
249
  /**
250
- * One assembled input row for a cross-source trainer. `npi` carries the cross-system join key (an NPI or a CCN) — it
251
- * rides `record.id` as the held-out label.
250
+ * One assembled input row for a cross-source trainer.
251
+ *
252
+ * Its `npi` field contains the cross-system join key (an NPI or a CCN).
253
+ * The trainer copies that key into `record.id` as the held-out label.
252
254
  */
253
255
  export interface CrossSourceRow extends Record<string, string> {
254
256
  npi: string;
@@ -258,7 +260,7 @@ export interface CrossSourceRow extends Record<string, string> {
258
260
  source: string;
259
261
  }
260
262
  /**
261
- * Every figure Phases D–F compute — what {@link TrainCrossSourceModelOptions.meta} receives.
263
+ * Every figure passed to {@link TrainCrossSourceModelOptions.meta}.
262
264
  */
263
265
  export interface CrossSourceTrainingFigures {
264
266
  records: number;
@@ -279,11 +281,12 @@ export interface TrainCrossSourceModelOptions {
279
281
  */
280
282
  createGeocoder: EvalGeocoderFactory;
281
283
  /**
282
- * The assembled two-source rows — the caller's source-loading phases stay with the caller.
284
+ * The assembled two-source rows.
285
+ * The caller owns source loading.
283
286
  */
284
287
  rows: readonly CrossSourceRow[];
285
288
  /**
286
- * The join keys present in BOTH sources.
289
+ * The join keys present in both sources.
287
290
  */
288
291
  joined: ReadonlySet<string>;
289
292
  addressFrequency: TermFrequencyTable;
@@ -292,7 +295,7 @@ export interface TrainCrossSourceModelOptions {
292
295
  */
293
296
  sources: readonly [string, string];
294
297
  /**
295
- * #655 threshold rule: max cross-source recall subject to this held-out pairwise precision.
298
+ * Max cross-source recall subject to this held-out pairwise precision.
296
299
  */
297
300
  precisionBar: number;
298
301
  /**
@@ -308,17 +311,18 @@ export interface TrainCrossSourceModelOptions {
308
311
  */
309
312
  exportPrefix: string;
310
313
  /**
311
- * Assemble the emitted `<prefix>_META` object. The caller owns field names and order so a retrain diffs cleanly
312
- * against its committed module.
314
+ * Assemble the emitted `<prefix>_META` object.
315
+ *
316
+ * The caller owns field names and order so a retrain diffs cleanly against its committed module.
313
317
  */
314
318
  meta: (figures: CrossSourceTrainingFigures) => Record<string, unknown>;
315
319
  report?: (line: string) => void;
316
320
  }
317
321
  /**
318
- * Phases C–F shared by the cross-source trainers: geocode + ingest each source under its own provenance label, block
319
- * the union and keep only CROSS-source candidate pairs, featurize with the SHARED `createMatchFeaturizer` (train ≡
320
- * inference), calibrate the #655 threshold on a held-out split of the join keys, train the shipped model on ALL pairs,
321
- * and emit it as a committed TS module.
322
+ * Geocode and ingest each source under its own provenance label, block the union,
323
+ * keep only cross-source candidate pairs, featurize with `createMatchFeaturizer` so train
324
+ * and inference agree, calibrate the threshold on a held-out split of the join keys,
325
+ * then train and emit the shipped model as a committed TS module.
322
326
  */
323
327
  export declare function trainCrossSourceModel(options: TrainCrossSourceModelOptions): Promise<{
324
328
  out: string;
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../lib/tools/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAA6B,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAGrF,OAAO,EAQN,KAAK,aAAa,EAElB,MAAM,QAAQ,CAAA;AACf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,aAAa,CAAA;IACtB;;OAEG;IACH,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,OAAO,CAAA;IACjD;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;CACnE;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,GAAG,SAAS,KAAG,MAA0B,CAAA;AAwBvE;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAQhD;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,EAAE,IAAI,MAAM,EAAE,KAAK,MAAM,KAAG,MACA,CAAA;AAE3E;;GAEG;AACH,eAAO,MAAM,GAAG,GAAI,IAAI,SAAS,MAAM,EAAE,KAAG,MAI3C,CAAA;AAID,eAAO,MA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