[英]Is it possible to "Mirror" the look of a decision tree generated with rpart.plot in R?
I have generated a simple decision with rpart
and displayed it with rpart.plot
like the following.我用rpart
生成了一个简单的决定,并用rpart.plot
显示它,如下所示。
Is it possible to edit the look of the tree so it's "mirrored" like the following:是否可以编辑树的外观,使其“镜像”如下:
(e-100%)
____(yes)___|___(no)____
| |
| (e-53%)
(p-47%) __|__
| |
(p-1%) (e-52%)
Solved my own problem.解决了我自己的问题。 Adding the parameter xflip=TRUE
to rpart.plot
function flips the tree horizontally like intended将参数xflip=TRUE
添加到rpart.plot
function 会按预期水平翻转树
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.