Skip to content

test(neighbor): oracle-vet 6 features (analytic + CellProfiler) -> neighbor 8/9 - #390

Open
darkclad wants to merge 1 commit into
PolusAI:mainfrom
darkclad:main-neighbor
Open

test(neighbor): oracle-vet 6 features (analytic + CellProfiler) -> neighbor 8/9#390
darkclad wants to merge 1 commit into
PolusAI:mainfrom
darkclad:main-neighbor

Conversation

@darkclad

Copy link
Copy Markdown

Vet the 2D neighbor family against independent/external oracles, taking it from 2/9 to 8/9 vetted.

CellProfiler (real cellprofiler.modules.MeasureObjectNeighbors, Adjacent method, run offline via tests/vetting/oracles/gen_neighbor_cellprofiler.py):

  • NUM_NEIGHBORS, CLOSEST_NEIGHBOR1_DIST: CP reproduces Nyxus exactly on the fixture. Upgrades these two rows from tracker-only to a checked-in generator + gtest (test_neighbor_cellprofiler.h).

Analytic (independent numpy recomputation of Nyxus' documented closed forms in tests/vetting/oracles/gen_neighbor_analytic.py; test_neighbor_analytic.h, 1e-4):

  • CLOSEST_NEIGHBOR2_DIST, CLOSEST_NEIGHBOR1_ANG, CLOSEST_NEIGHBOR2_ANG, ANG_BW_NEIGHBORS_MEAN/STDDEV/MODE. These are deterministic closed forms of the (CP-vetted) neighbor graph. CP's AngleBetweenNeighbors is a subtended angle and its SecondClosestDistance ranks all objects globally -- different definitions, so CP is not a valid oracle for them.

PERCENT_TOUCHING stays regression: audited against real CellProfiler and found to diverge on 3/5 ROIs. Nyxus = distinct contour pixels 8-adjacent to a neighbor / contour length; CP = object outline pixels overlapping a disk(distance+0.5)-dilated neighbor / perimeter. No CP method (Adjacent/Expand/Within) reproduces Nyxus. Documented convention gap.

Removes the two superseded "unvetted_no_direct_oracle" angle regression functions (now tightly vetted by the analytic oracle). Registry updated; coverage regenerated (604 -> 610 / 758). gtest 717/717; pytest 72 passed (7 arrow fails are the tiff-only local build, not regressions).

…ighbor 8/9

Vet the 2D neighbor family against independent/external oracles, taking it from
2/9 to 8/9 vetted.

CellProfiler (real cellprofiler.modules.MeasureObjectNeighbors, Adjacent method,
run offline via tests/vetting/oracles/gen_neighbor_cellprofiler.py):
  - NUM_NEIGHBORS, CLOSEST_NEIGHBOR1_DIST: CP reproduces Nyxus exactly on the
    fixture. Upgrades these two rows from tracker-only to a checked-in generator +
    gtest (test_neighbor_cellprofiler.h).

Analytic (independent numpy recomputation of Nyxus' documented closed forms in
tests/vetting/oracles/gen_neighbor_analytic.py; test_neighbor_analytic.h, 1e-4):
  - CLOSEST_NEIGHBOR2_DIST, CLOSEST_NEIGHBOR1_ANG, CLOSEST_NEIGHBOR2_ANG,
    ANG_BW_NEIGHBORS_MEAN/STDDEV/MODE. These are deterministic closed forms of the
    (CP-vetted) neighbor graph. CP's AngleBetweenNeighbors is a subtended angle and
    its SecondClosestDistance ranks all objects globally -- different definitions,
    so CP is not a valid oracle for them.

PERCENT_TOUCHING stays regression: audited against real CellProfiler and found to
diverge on 3/5 ROIs. Nyxus = distinct contour pixels 8-adjacent to a neighbor /
contour length; CP = object outline pixels overlapping a disk(distance+0.5)-dilated
neighbor / perimeter. No CP method (Adjacent/Expand/Within) reproduces Nyxus.
Documented convention gap.

Removes the two superseded "unvetted_no_direct_oracle" angle regression functions
(now tightly vetted by the analytic oracle). Registry updated; coverage
regenerated (604 -> 610 / 758). gtest 717/717; pytest 72 passed (7 arrow fails are
the tiff-only local build, not regressions).
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