[英]ctree plot decision tree in party package in R , terminal node occurs some weird numbers - issue?
I came across something really odd.. and I couldn't figured it out why.. 我碰到了一个很奇怪的东西..我不知道为什么..
I use the same code here below : 我在下面使用相同的代码:
library(party)
r_tree <- ctree(readingSkills$nativeSpeaker ~ readingSkills$age +
readingSkills$shoeSize + readingSkills$shoeSize +
readingSkills$score,data = readingSkills)
plot(r_tree,type = "simple")
r_tree
two week ago I got normal graph .. but today my terminal nodes have some odd numbers in them like showing in this picture below.. I have tried to restarted my PC , uninstalled the packet , reinstall again and again , but it still not working.. 两周前,我得到了正常图形..但是今天我的终端节点中有些奇数,如下图所示。.我试图重新启动PC,卸载数据包,一次又一次地重新安装,但仍然无法正常工作.. Just wondering if anyone see the same issue , or what have I done wrong , or how can I fix this ? 只是想知道是否有人看到相同的问题,或者我做错了什么,或者我该如何解决?
Thanks 谢谢
This is a bug caused by package "partykit". 这是由“ partykit”软件包引起的错误。 If you'll reopen R from start or do: 如果您要从头开始重新打开R或执行以下操作:
detach("package:partykit", unload=TRUE)
and run detach("package:partykit", unload=TRUE)
并运行
library(party)
r_tree <- ctree(readingSkills$nativeSpeaker ~ readingSkills$age +
readingSkills$shoeSize + readingSkills$shoeSize +
readingSkills$score,data = readingSkills)
plot(r_tree,type = "simple")
You'll get the normal plot 你会得到正常的情节
But if you'll library the "partykit" package again and rerun the same code, you''ll get that nonsense plot again 但是,如果您再次将“ partykit”程序包存入库并重新运行相同的代码,则将再次得到该废话图
library(partykit)
r_tree <- ctree(readingSkills$nativeSpeaker ~ readingSkills$age +
readingSkills$shoeSize + readingSkills$shoeSize +
readingSkills$score,data = readingSkills)
plot(r_tree,type = "simple")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.