Skip to content

Prevalence Implementation#37

Merged
olivierlabayle merged 20 commits intomainfrom
ccw-tmle
Dec 16, 2025
Merged

Prevalence Implementation#37
olivierlabayle merged 20 commits intomainfrom
ccw-tmle

Conversation

@joshua-slaughter
Copy link
Copy Markdown
Member

Adding functionality for the input of a prevalence option to allow for the use of CCW-TMLE. Notable issues in implementation:

  1. The tuned XGBoost seems to work fine but GLM and GLMnet return errors in the outcome and propensity score fits respectively. The standard XGBoost fails before estimation due to a MethodError.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements functionality for a prevalence option to enable the use of CCW-TMLE (Covariate-Conditional Weighted TMLE). The implementation adds prevalence as a parameter throughout the estimation pipeline while updating type names to match current TMLE.jl conventions.

  • Adds prevalence parameter support to the CLI, runner, and model registry
  • Updates estimator type names from deprecated forms (TMLEE/OSE) to current ones (Tmle/Ose)
  • Includes comprehensive test coverage for prevalence functionality with binary outcomes

Reviewed Changes

Copilot reviewed 22 out of 26 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/cli.jl Adds prevalence command-line argument
src/runner.jl Integrates prevalence parameter into Runner and estimation functions
src/models/registry.jl Updates model constructors to use current type names and pass prevalence
src/models/glmnet.jl Adds weights parameter support to GLMNet fitting
test/runner.jl Adds comprehensive test for prevalence functionality
test/testutils.jl Adds binary-only dataset generation and configuration utilities
Various config files Updates deprecated type names to current TMLE.jl conventions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/models/glmnet.jl Outdated
Comment thread test/testutils.jl
Comment thread src/runner.jl Outdated
@joshua-slaughter
Copy link
Copy Markdown
Member Author

Hi @olivierlabayle I have revisited the CLI to remove the LinearBinaryClassifier and replace it with the LogisiticClassifier (the original behavior). I have also updated the tests and TMLE version. Let me know what else is needed before merging this with main as well.

@olivierlabayle
Copy link
Copy Markdown
Member

Thanks @joshua-slaughter, I'll have a look at this before the end of the week. Have you tested this new implementation within the TARGENE pipeline? Does it cause any downstream issues that need versions to be propagated, i.e. in TargeneCore?

@joshua-slaughter
Copy link
Copy Markdown
Member Author

It has required slight changes to TargeneCore.jl which I have implemented here https://github.com/TARGENE/TargeneCore.jl/tree/generate_outputs_update

Beyond this there are some issues in targene-pipeline with the simulation workflows which you can view on the prevalence-parameter branch.

Copy link
Copy Markdown
Member

@olivierlabayle olivierlabayle left a comment

Choose a reason for hiding this comment

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

@joshua-slaughter thanks for the good work. I've left a few minor comments that need to be addressed.

Comment thread src/runner.jl Outdated
Comment thread test/testutils.jl
Comment thread test/runner.jl Outdated
Comment thread test/testutils.jl
Comment thread src/models/glmnet.jl
Comment thread src/runner.jl
Copy link
Copy Markdown
Member Author

@joshua-slaughter joshua-slaughter left a comment

Choose a reason for hiding this comment

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

Any reason for having two times what seems to be the same test with a different model? Probably drop one if not.

This was really a sanity check for me to see if the custom models were accepting weights currently in the full implementation. Would be okay with removing either.

@joshua-slaughter
Copy link
Copy Markdown
Member Author

Hi @olivierlabayle , I addressed your comments. Hopefully it is ready to merge, something seems to be wrong between versions.

Copy link
Copy Markdown
Member

@olivierlabayle olivierlabayle left a comment

Choose a reason for hiding this comment

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

Thx Josh, just a few more things which shouldn't take long to fix. For the version problem I am pretty sure the issue comes from loading the Julia estimator file. I was pretty certain this would fire back at some point. So 1.12 is out of scope for now if we want to support that feature or we have to find a way to keep doing it. In the meantime we can change the version in CI.yml to :
version:
- '1.11' instead of '1' here (note that 1.11 is also the version used in the docker image
- '1.10'

Comment thread src/models/glmnet.jl Outdated
Comment thread src/runner.jl Outdated
Comment thread src/runner.jl
Comment thread test/outputs.jl Outdated
Comment thread test/outputs.jl Outdated
@joshua-slaughter joshua-slaughter self-assigned this Dec 15, 2025
@joshua-slaughter
Copy link
Copy Markdown
Member Author

Everything has been addressed! Should be ready to merge and up the version

@olivierlabayle olivierlabayle merged commit 612f84d into main Dec 16, 2025
11 checks passed
@olivierlabayle olivierlabayle deleted the ccw-tmle branch December 16, 2025 10:27
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