Skip to content

Commit

Permalink
Merge branch 'master' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
nt-williams authored Jun 26, 2024
2 parents 7a2f31a + 432551c commit 5dfc790
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Imports:
checkmate (>= 2.1.0),
SuperLearner,
schoolmath
URL: https://github.com/nt-williams/lmtp
URL: http://beyondtheate.com, https://github.com/nt-williams/lmtp
BugReports: https://github.com/nt-williams/lmtp/issues
Suggests:
testthat (>= 2.1.0),
Expand Down
6 changes: 6 additions & 0 deletions R/density_ratios.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
cf_r <- function(task, learners, mtp, control, pb) {
out <- vector("list", length = length(task$folds))

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! If your exposure is randomized, consider using `c('SL.glm', 'SL.glmnet')`.",
call. = FALSE)
}

for (fold in seq_along(task$folds)) {
out[[fold]] <- future::future({
estimate_r(
Expand Down

0 comments on commit 5dfc790

Please sign in to comment.