Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including variable labels in the policy tree visualization #159

Open
njawadekar opened this issue Jan 3, 2023 · 1 comment
Open

Including variable labels in the policy tree visualization #159

njawadekar opened this issue Jan 3, 2023 · 1 comment
Labels
question Further information is requested

Comments

@njawadekar
Copy link

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

@erikcs
Copy link
Member

erikcs commented Jan 5, 2023

Hi @njawadekar, you can rename tree$columns to the names you prefer, then plot.

@erikcs erikcs added the question Further information is requested label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants