Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditionally use timeId in computeStandardizedDifference in temporal covariate data #226

Closed

Conversation

gowthamrao
Copy link
Member

#225

Seems to fix the issue

@gowthamrao gowthamrao changed the base branch from main to develop February 1, 2024 01:45
@gowthamrao gowthamrao changed the title Conditionally use timeId Conditionally use timeId in computeStandardizedDifference in temporal covariate data Feb 1, 2024
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (6a7e90a) 93.34% compared to head (6c3b09c) 91.44%.
Report is 39 commits behind head on develop.

Files Patch % Lines
R/CompareCohorts.R 50.81% 30 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #226      +/-   ##
===========================================
- Coverage    93.34%   91.44%   -1.91%     
===========================================
  Files           16       16              
  Lines         1412     1449      +37     
===========================================
+ Hits          1318     1325       +7     
- Misses          94      124      +30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -59,31 +59,52 @@ computeStandardizedDifference <- function(covariateData1, covariateData2, cohort
if (!isAggregatedCovariateData(covariateData2)) {
stop("Covariate2 data is not aggregated")
}
if (!setequal(colnames(covariateData1$covariates), colnames(covariateData1$covariates))) {
Copy link
Collaborator

@ginberg ginberg Feb 2, 2024

Choose a reason for hiding this comment

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

you are now comparing covariateData1 to covariateData1, one of these should be covariateData2. Also, could you put this check after the null check of the covariates?

Copy link
Member Author

@gowthamrao gowthamrao Feb 5, 2024

Choose a reason for hiding this comment

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

@ginberg , i suspect there is something logically incorrect in this code (not my PR, but the original released code). e.g. i am getting results when sometimes mean1 > mean2 has 0 records, or mean2 > mean1 has 0 records. Also, i find it hard to read the code. I will do another PR for your consideration that is a refactor of this full script

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gowthamrao ok, that's good to know. Thanks for your refactoring. It would be helpful if you could provide a reprex of a situation in which you are getting logically incorrect results, could you add that?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ginberg I have done the PR with the refactor. I don't know how to do the reprex and it will probably take too much time to emulate the complex feature extraction output.

gowthamrao added a commit to gowthamrao/FeatureExtraction that referenced this pull request Feb 5, 2024
@ginberg
Copy link
Collaborator

ginberg commented Feb 15, 2024

@gowthamrao can we close this PR, since you opened this new one? #228

@anthonysena
Copy link
Collaborator

@gowthamrao closing in favor of #228.

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.

3 participants