EscalationRule {RLescalation} | R Documentation |
EscalationRule Class
Description
This class represents an escalation rule that generates a next escalation.
Public fields
policy
The RLlib policy that is a Python object.
dir
Directory path of the escalation rule (policy).
dirpath
Full path to the directory of the escalation rule.
created_at
Created time of this object.
info
Information when learning the escalation rule.
input
Inputs for learning the escalation rule.
log
The log of scores during the learning of the escalation rule.
checkpoints
The integer vector of iteration counts for checkpoints.
checkpoints_paths
The paths to the directories where each checkpoint is stored.
Methods
Public methods
Method new()
Create a new EscalationRule object.
Usage
EscalationRule$new(dir = "latest", base_dir = "escalation_rules")
Arguments
dir
A character value. A directory name or path where an escalation rule is outputted. By default, the latest escalation rule is searched in 'base_dir'.
base_dir
A character value. A directory path that is used as the parent directory if the 'dir' argument is a directory name and is not used otherwise.
Method opt_action()
Compute optimal action probabilities using the obtained escalation rule for data of N and DLT.
Usage
EscalationRule$opt_action(current_dose, data_Ns, data_DLTs)
Arguments
current_dose
An integer value. This is the current dose index, which is within
1:J
.data_Ns
A numeric vector. The cumulative number of patients assigned to each dose in your clinical trial.
data_DLTs
A numeric vector. The cumulative number of DLTs corresponding to each dose for the 'data_Ns' argument.
Returns
A character that represents the optimal action. One of the followings: down, stay, up, MTD_1, ..., MTD_J, no_MTD
Method resume_learning()
Resume learning the escalation rule. This function updates the original EscalationRule object.
Usage
EscalationRule$resume_learning(iter)
Arguments
iter
A number of additional iterations.
Returns
An updated EscalationRule object.
Method set_info()
Set information when learning the escalation rule.
Usage
EscalationRule$set_info(info, input, log, checkpoints)
Arguments
info
Information when learning the escalation rule.
input
Inputs for learning the escalation rule.
log
The log of scores during the learning of the escalation rule.
checkpoints
The paths to the directories where each checkpoint is stored.
Method print()
Print function for EscalationRule object
Usage
EscalationRule$print()
Method clone()
The objects of this class are cloneable with this method.
Usage
EscalationRule$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.