Forum: help


RE: plot individual tree from cforest [ Reply ] By: Achim Zeileis on 2021-02-03 12:36 | [forum:48686] |
Markus, thanks for the pointer, this is a bug in the subset method for party objects. You can use the following workaround: ct1 <- gettree(cf, 1) ct1$fitted <- ct1$fitted[, c("(fitted)", "(weights)", "(response)")] plot(ct1) Torsten, this is caused by the following bug: The [.party/[[.party method drops all columns in $fitted before the "(fitted)" column (line 128-134 in party.R). I'm not sure what is the rationale behind this, do you remember? I guess we should fix gettree.cforest to do the appropriate ordering of the $fitted elements. Also we should consider fixing [[.party/[.party. |
plot individual tree from cforest [ Reply ] By: Markus Loecher on 2021-02-03 09:57 | [forum:48685] |
Hi, is it possible to easily plot a single tree form a forest using e.g. gettree() ? I unsuccessfully tried plot(gettree(cf,1)) . Very sorry if this question has been asked before (it must have). I searched SO already. Thx! Markus |