Repository navigation
14/ prepareData: clear error for a missing or empty outcome (results unchanged) - #138
Draft
ellispatrick wants to merge 1 commit into
Draft
ellispatrick wants to merge 1 commit into
ellispatrick wants to merge 1 commit into
Conversation
ellispatrick
force-pushed
the
review/9-coxnet-path
branch
from
October 10, 2026 22:47
9bff739 to
c712639
Compare
ellispatrick
force-pushed
the
review/14-crossvalidate-null-outcome
branch
from
October 10, 2026 22:47
8a00351 to
267c036
Compare
Why: an outcome of NULL (e.g. from outcomes[[name]] with a name the list doesn't have) passed every check, and each fold then failed inside feature selection, so crossValidate stopped with "All cross-validations had an error. The common problem is: argument 1 is not a vector", which doesn't point to the cause. Found with the protocol's PROMAD data, whose outcome list is named Counts_<cohort>_Biopsy_ABMR.csv while its measurement list is named <cohort>. prepareData, which crossValidate calls for matrix and DataFrame input, now stops with "'outcome' is missing or empty". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TfsjwkbDbHkX4kJZNe4ER4
ellispatrick
force-pushed
the
review/9-coxnet-path
branch
from
October 14, 2026 00:20
c712639 to
333aa6c
Compare
ellispatrick
force-pushed
the
review/14-crossvalidate-null-outcome
branch
from
October 14, 2026 00:20
267c036 to
13f0134
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Results unchanged.
prepareData, whichcrossValidatecalls for matrix and DataFrame input, now stops with "'outcome' is missing or empty" when the outcome isNULLor has length 0.Why
NULL, for example fromoutcomes[[name]]with a name the list doesn't have, used to pass every check.crossValidatestopped with: "All cross-validations had an error. The common problem is: argument 1 is not a vector". That message doesn't point to the cause.Counts_<cohort>_Biopsy_ABMR.csv, while its measurement list is named<cohort>, so looking up the outcome by cohort name returnedNULL.What changes
prepareDataDataFrame method, which the matrix and data.frame methods also reach.prepareDataandcrossValidatewith aNULLoutcome, a missing outcome and an empty factor.Evidence
548 test expectations pass (
test_branch.sh).🤖 Generated with Claude Code
https://claude.ai/code/session_01TfsjwkbDbHkX4kJZNe4ER4