Abhinav Piplani
Abhinav Piplani

Reputation: 173

Plotting rules as a tree for Cubist package in R

Is there any way I can plot the rules obtained from a Cubist model in a decision tree format? I can visualize the rules in text format (in console) by viewing the model summary, but I am unable to obtain a graphical tree presentation of the same. I have tried using "partykit" , "rattle" , "Rgraphviz" and "Rweka" packages

Upvotes: 2

Views: 526

Answers (1)

Andreas Gutweniger
Andreas Gutweniger

Reputation: 61

I had the same problem - and didn't succeed. Since cubist is originally written in C and the R library simply returns the output captured from the C code (see https://cran.r-project.org/web/packages/Cubist/Cubist.pdf, page 3), I am pretty sure that plotting routines from other R libraries won't work.

Hence, I only see these solutions:

  • write your own visualisation, based on parsing the text output (definately a lot of work)
  • wait for a later version of cubist with such a routine included (although I have no idea, if this is even planned)

Upvotes: 1

Related Questions