policytree
policytree copied to clipboard
Including variable labels in the policy tree visualization
Based on existing documentation, I understand that when outputting a policy tree object into a visualization using the plot.policy_tree function, one can add the leaf.labels argument to ensure that the "treatment" or "control" recommendations will be labelled as such.
Similarly, how can one ensure that the variable labels (rather than the variable names) are output in this plot? (i.e., in the data visualization of the policy tree, I would like the variable "SBP" to appear as its corresponding label, "Systolic Blood Pressure").
Hi @njawadekar, you can rename tree$columns
to the names you prefer, then plot.