I'm struggling with an error message that I don't understand. I'm doing some decision trees and everything goes fine, until I try to plot it
plot(as.party.Weka_tree(CostSensitive_Tree))
which gives this error:
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'plot': could not find function "as.party.Weka_tree"
I checked multiple times with help.search("as.party.Weka_tree")
and the package ( partykit) is installed, what could be the cause of this error?
Thanks!
First, you need to make sure that the package is loaded, ie, library("partykit")
. Second, you should not call the S3 method directly but just say as.party(CostSensitive_Tree)
. Internally the as.party()
generic function then dispatches to the as.party.Weka_tree()
method but the latter should not be called directly.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.