Optimal_Rule_Revere: Learning the Optimal Rule using the Revere framework

Optimal_Rule_RevereR Documentation

Learning the Optimal Rule using the Revere framework

Description

Functions used to learn the Optimal Rule given a tmle_task and likelihood, using the Revere framework. Complements 'tmle3_Spec_mopttx_blip_revere' class.

Format

An R6Class object inheriting from tmle3_Spec.

Value

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.

Parameters

- 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.

Super class

tmle3::tmle3_Spec -> Optimal_Rule_Revere

Methods

Public methods

Inherited methods

Method new()

Usage
Optimal_Rule_Revere$new(
  tmle_task,
  tmle_spec,
  likelihood,
  V,
  options,
  shift_grid = seq(-1, 1, by = 0.5)
)

Method factor_to_indicators()

Usage
Optimal_Rule_Revere$factor_to_indicators(x, x_vals)

Method V_data()

Usage
Optimal_Rule_Revere$V_data(tmle_task, fold = NULL)

Method DR_full()

Usage
Optimal_Rule_Revere$DR_full(v, indx)

Method blip_revere_function()

Usage
Optimal_Rule_Revere$blip_revere_function(tmle_task, fold_number)

Method bound()

Usage
Optimal_Rule_Revere$bound(cv_g)

Method fit_blip()

Usage
Optimal_Rule_Revere$fit_blip()

Method rule()

Usage
Optimal_Rule_Revere$rule(tmle_task, fold_number = "full")

Method rule_stochastic()

Usage
Optimal_Rule_Revere$rule_stochastic(tmle_task, fold_number = "full")

Method clone()

The objects of this class are cloneable with this method.

Usage
Optimal_Rule_Revere$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

## 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)

tlverse/tmle3mopttx documentation built on Aug. 9, 2022, 3:31 p.m.