Skip to content

report.txt starts with DIAGNOSIS: what limits what the run finds, each with its fix - #144

Merged
mvsbm merged 2 commits into
mainfrom
report-diagnosis-main
Nov 15, 2026
Merged

mvsbm merged 2 commits into
mainfrom
report-diagnosis-main

Conversation

@mvsbm

@mvsbm mvsbm commented Nov 15, 2026

Copy link
Copy Markdown
Owner

What and why

Replaces #143, rebased onto main after #142 merged; one commit.

report.txt now starts with DIAGNOSIS: what limits what the run finds, ranked by pairs at stake, at most 8 lines. Each line says what, gives a number, and names the fix (a command where there is one). Items with nothing found are left out. It holds no value, only field, column and level names, counts and shares.

  1. EM learned households: sessions of the run's own EM (the method's rules or the set fields) whose matches mostly share no given name → nayose choose em --workspace …. train_fs now judges every session of the method's own fit, run in turn or kept apart, as fit em choose would, and keeps the result in model.json "er" em_given.
  2. Sparse compared fields (under 30% filled; a person's name and a company's aside, since each kind fills one), one comparison a line. Gives the pairs below the review floor that can't compare it, and an unmapped column whose values look like the field (COLUMNS NOT MAPPED, share ≥ 50%) → nayose set feature "<path>=<current>,<column>", the column added as a fallback.
  3. Near misses: pairs in [0, review floor) that agree exactly on a name (or the given name) and another field, counted per pattern, plus the model's own expected true pairs among all pairs below the floor (sum of match_probability). A phone plus an address alone is left out, since that is a household's pattern.
  4. Levels that learned nothing (m = u) that hold pairs; the count of empty ones is given in brackets → nayose try sample.
  5. Search: the gap's misses at the review floor with their interval, and skipped oversized blocks whose best sampled pair came within 2 bits of the search floor → nayose describe method.
  6. Thin EM sessions (under 200 pairs) → more records. This item always comes last.

On the population fixture (tests/method.toml):

DIAGNOSIS  (what limits what the run finds, the most pairs at stake first)
  birth_date 12% filled: 32 pairs below review compare no birth
  26 pairs below review agree exactly on a name and another field (name + address 19, given name + address 4, company + address 3); the model expects 28 true pairs among the 32 below review → nayose list patterns --workspace …
  levels that learned nothing hold pairs, at 0 bits: birth exact 1, address address close 1 (6 more hold none) → nayose try sample --workspace …
  EM learned from few pairs: phone 40, address 103 → nayose try sample --workspace …

On a generated household file (113,338 records, contact fields ~5% filled), with the method's EM:

DIAGNOSIS  (what limits what the run finds, the most pairs at stake first)
  EM learned households from phone (4% of its matches agree on the given name), address (3% of its matches agree on the given name): it scores the 174 pairs below review → nayose choose em --workspace …
  birth_date 19% filled: 164 pairs below review compare no birth
  8 pairs below review agree exactly on a name and another field (name + phone 6, name + address 2); the model expects 128 true pairs among the 174 below review → nayose list patterns --workspace …
  no key lists about 6 pairs at 4+ (0–15) → nayose describe method --workspace …
  address_code 3%, address 3%, postal_code 4% filled: 3 pairs below review compare no address; column ADDR_CD_KANA looks like address_code (3% filled) → nayose set feature "Address/Address code=SOURCE_ADDR_CD,ADDR_CD_KANA" --workspace …

Tests: on the population run, each item is constructed in turn, and each line and its fix are checked, the most pairs first, at most 8 lines. The method's own sessions, run in turn and kept apart, are judged on a household frame. The "report holds no record value" test passes. Full suite on 3.14 (-n auto) and the non-browser tier on 3.12 pass.

Checklist (CONTRIBUTING.md)

  • Reviewed before merging: a review pass on this pull request's changes (rule 10)
  • Unhappy paths tested at the real size: two at once, an input twice, the real data size, a lost server (rule 9)
  • Every new limit names itself (shortcut: …), and every store that grows says what bounds it (rules 3 and 4)
  • Docs and diagrams describe the code as it is

🤖 Generated with Claude Code

https://claude.ai/code/session_012o8JNBKSY1aREPbMQDG8g2

Marvin Ma and others added 2 commits November 16, 2026 03:10
… most pairs at stake first, at most eight lines, each with a number and the command that fixes it; no record's value in it

- er.report.diagnosis, in order of pairs at stake: EM sessions of the run's own fit that learned households (nayose choose em); compared fields under 30% filled, one comparison a line, with the pairs below the review floor it can't compare and an unmapped column that looks like the field (nayose set feature with it as a fallback); pairs below the review floor agreeing exactly on a name and another field, by pattern, with the true pairs the model expects below the floor; levels that learned nothing yet hold pairs (nayose try sample); the gap at the review floor and skipped oversized blocks that came within 2 bits of the search floor (nayose describe method); EM sessions of under 200 pairs, last. Items with nothing found are left out.
- er.match.train_fs: every EM session of the method's own fit (in turn, or kept apart) is judged as fit em "choose" judges it, in model.json "er" em_given (session, pairs, given-name share); er.match.judged split from chosen.
- Docs: usage section 7 lists the items; architecture names report.diagnosis; full-run.puml's report box names its functions.
- Tests: the method's own sessions, in turn and kept apart, judged on a household frame (phone under half, birth over); on the population run, each item constructed in turn (a sparse field with a look-alike column, a household session, three pairs moved below the floor, a level that learned nothing, the gap and a skipped block, a thin session), each line and its fix said, the most pairs first, at most eight lines; the report-holds-no-value test passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012o8JNBKSY1aREPbMQDG8g2
@mvsbm
mvsbm merged commit c2e40fd into main Nov 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant