[R] Decision Trees RWeka

strinz at freenet.de strinz at freenet.de
Tue Jun 17 17:46:37 CEST 2008


Hello,

  I have a question concerning decision 
  trees coming from RWeka : 

  library(RWeka)
  m 	=J48(Species~.,data=iris)

  How could such a decision tree be transferred
  into a matrix, pretty much in the same fashion,
  as it is done by getTree() in library(ofw)

  library(ofw)
  data(srbct)
  attach(srbct)
  ##ofwCART
  learn.cart.keep <- ofw(srbct, as.factor(class),type="CART", ntree=50, nforest=10, mtry=5)
  getTree(learn.cart.keep, k=3)
  detach(srbct)

  It would be very convenient to have 
  a Weka Decision Tree object  represented
  in matrix form or in y common binary tree format

thanks a lot

















More information about the R-help mailing list