【问题标题】:How to call arrows function in rpart.plot如何在 rpart.plot 中调用箭头函数
【发布时间】:2021-02-25 18:56:35
【问题描述】:

我必须在决策树的两个节点之间绘制带有分支的箭头

prp(ntree, type=4, extra=105, branch=0.8,
  box.col="grey", tweak=1.2,
  round=2, leaf.round =2, branch.lty=8, split.fun = split.fun, 
  faclen = 0, clip.facs = TRUE, 
  facsep = " or ", gap=0, space = 0, 
  arrows(x0, y0, x1, y1))

我想要这样的图表:

rpart.plot中如何调用箭头函数?

【问题讨论】:

  • 如果您包含一个简单的reproducible example,其中包含可用于测试和验证可能解决方案的示例输入和所需输出,则更容易为您提供帮助。
  • prp(ntree,type=4,extra=105,branch=0.8,box.col="grey",tweak=1.2,round=2,leaf.round=2,branch.lty= 8、split.fun = split.fun, faclen = 0, clip.facs = TRUE, facsep = " or ", gap=0, space = 0)
  • 我想要这样的图表。
  • 请编辑您的问题以包含代码和数据(不要在 cmets 中添加此信息,因为它的格式不正确)。

标签: r nodes decision-tree rpart arrows


【解决方案1】:

rpart.plot(软件包版本 3.0.9,2020 年 9 月)尚不支持箭头。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-07
    • 2020-10-18
    • 2019-07-23
    相关资源
    最近更新 更多