Skip to content

Commit

Permalink
Update density ratio learner warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
nt-williams committed Jun 26, 2024
1 parent 4626537 commit 432551c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/density_ratios.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cf_r <- function(Task, learners, mtp, lrnr_folds, trim, full_fits, pb) {
out <- list()

if (length(learners) == 1 && learners == "SL.mean") {
warning("Using 'SL.mean' as the only learner of the density ratios will always result in a misspecified model!",
warning("Using 'SL.mean' as the only learner of the density ratios will always result in a misspecified model! If your exposure is randomized, consider using `c('SL.glm', 'SL.glmnet')`.",
call. = FALSE)
}

Expand Down

0 comments on commit 432551c

Please sign in to comment.