Skip to content

5/8 Maintenance: one multiview branch, small fixes, dead code removed (results unchanged) - #130

Merged
DarioS merged 1 commit into
review/4-pathways-crisscrossfrom
review/5-maintenance
Oct 28, 2026
Merged

DarioS merged 1 commit into
review/4-pathways-crisscrossfrom
review/5-maintenance

Conversation

@ellispatrick

@ellispatrick ellispatrick commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Part of a stack of 8 pull requests from the October 2026 audit of ClassifyR (AUDIT.md on branch audit-2026-10). Each part is based on the one before, so they need to be merged in order. Each one can be accepted, changed or rejected on its own merits. Draft PR #125 holds all eight together. Every part installs and passes its own tests.

Stack, merge in order: #126 tests and core fixes → #127 interface fixes → #128 metrics and plots → #129 pathways and criss-cross → #130 maintenance → #131 faster cross-validation (identical results) → #132 shared folds (changes results) → #133 release notes. The regression harness and timings are in SydneyBioX/ProjectClassifyR (private).

Summary

Maintenance from a read-only review: duplicated code merged, small bugs fixed, dead code and one dependency removed. Results are unchanged.

Why and what

  • Duplicated branches: the merge, prevalidation and PCA branches of crossValidate were the same except for the clinical filter. They are now one branch, so a fix can't be missed in one of the three.
  • An unknown multiViewMethod (e.g. "Merge") is an error naming the choices. It used to fail with "object 'result' not found".
  • CV loses an unused independent train/test path that could not work (it refitted on NULL data).
  • train and predict align the samples of a list of tables by name, as prepareData does. Tables in different sample orders were silently mismatched.
  • maxSimilarity is passed through train and runTest to prepareData.
  • Dependency: dcanr was imported for one cor.pairs call, which equals stats::cor (to 4e-16); stats::cor is used and dcanr dropped.
  • Removed, unused:
    • mergeTrainInterface (never called);
    • fastCox (left over from CMA, built an undefined class);
    • simplifyResults.

Do results change?

No. The regression harness gives identical results to part 4.

Evidence

291 tests pass. Further maintenance ideas are listed in ProjectClassifyR docs/MAINTAINABILITY.md:

  • one classifier registry;
  • splitting runTest and samplesMetricMap;
  • trimming dependencies;
  • consistent argument names.

These need decisions and are not included here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TfsjwkbDbHkX4kJZNe4ER4

…emovals from a review

Results are unchanged (regression harness identical to the previous commit).
- An unknown multiViewMethod is an error naming the choices (it failed with "object 'result' not found").
- The merge, prevalidation and PCA branches of crossValidate were the same apart from the clinical filter;
  they are one branch.
- CV loses its unused independent train/test path, which could not work (it refitted on NULL data).
- train and predict align the samples of a list of tables by name, as prepareData does.
- prepareDataFormals includes maxSimilarity, so train and runTest pass it to prepareData.
- prepareData's maxSimilarity uses stats::cor; dcanr (one call) is dropped from Imports.
- Unused mergeTrainInterface, fastCox (from CMA, built an undefined class) and simplifyResults removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfsjwkbDbHkX4kJZNe4ER4

@DarioS DarioS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor edits in this commit.

@DarioS
DarioS merged commit 0f0013a into review/4-pathways-crisscross Oct 28, 2026
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.

2 participants