| Optimal_Rule_Revere | R Documentation |
Functions used to learn the Optimal Rule given a tmle_task and likelihood, using the Revere framework. Complements 'tmle3_Spec_mopttx_blip_revere' class.
An R6Class object inheriting from
tmle3_Spec.
A optimal rule object inheriting from tmle3_Spec
with methods for learning the optimal rule. For a full list of the available
functionality, see the complete documentation of tmle3_Spec.
- tmle_task: Task object specifying the data and node structure.
- tmle_spec: Spec object of tmle3. Allows for different
Specs to use the current class for learning the Optimal Rule.
- likelihood: Likelihood object of tmle3, corresponding
to the current estimate of the required parts of the likelihood necessary for the target
parameter.
- V: User-specified list of covariates used to define the rule.
- options: Information on all the variables passed to the original Spec.
tmle3::tmle3_Spec -> Optimal_Rule_Revere
new()Optimal_Rule_Revere$new( tmle_task, tmle_spec, likelihood, V, options, shift_grid = seq(-1, 1, by = 0.5) )
factor_to_indicators()Optimal_Rule_Revere$factor_to_indicators(x, x_vals)
V_data()Optimal_Rule_Revere$V_data(tmle_task, fold = NULL)
DR_full()Optimal_Rule_Revere$DR_full(v, indx)
blip_revere_function()Optimal_Rule_Revere$blip_revere_function(tmle_task, fold_number)
bound()Optimal_Rule_Revere$bound(cv_g)
fit_blip()Optimal_Rule_Revere$fit_blip()
rule()Optimal_Rule_Revere$rule(tmle_task, fold_number = "full")
rule_stochastic()Optimal_Rule_Revere$rule_stochastic(tmle_task, fold_number = "full")
clone()The objects of this class are cloneable with this method.
Optimal_Rule_Revere$clone(deep = FALSE)
deepWhether to make a deep clone.
## Not run:
library(sl3)
library(tmle3)
library(data.table)
data("data_bin")
data <- data_bin
Q_lib <- make_learner_stack("Lrnr_mean", "Lrnr_glm_fast")
g_lib <- make_learner_stack("Lrnr_mean", "Lrnr_glm_fast")
B_lib <- make_learner_stack("Lrnr_glm_fast", "Lrnr_xgboost")
metalearner <- make_learner(Lrnr_nnls)
Q_learner <- make_learner(Lrnr_sl, Q_lib, metalearner)
g_learner <- make_learner(Lrnr_sl, g_lib, metalearner)
B_learner <- make_learner(Lrnr_sl, B_lib, metalearner)
learner_list <- list(Y = Q_learner, A = g_learner, B = B_learner)
node_list <- list(W = c("W1", "W2", "W3"), A = "A", Y = "Y")
tmle_spec <- tmle3_mopttx_blip_revere(
V = c("W1", "W2", "W3"),
type = "blip1", learners = learner_list, maximize = TRUE,
complex = TRUE, realistic = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.