Re: [R] rpart: apply tree to new data to get counts

2011-08-30 Thread Stephen Milborrow
Jay josip.2...@gmail.com het geskryf When I have made a decision tree with rpart, is it possible to apply this tree to a new set of data in order to find out the distribution of observations? Ideally I would like to plot my original tree, with the counts (at each node) of the new data. Sadly,

[R] rpart: apply tree to new data to get counts

2011-08-29 Thread Jay
Hi, when I have made a decision tree with rpart, is it possible to apply this tree to a new set of data in order to find out the distribution of observations? Ideally I would like to plot my original tree, with the counts (at each node) of the new data. Reagards, Jay

Re: [R] rpart: apply tree to new data to get counts

2011-08-29 Thread Weidong Gu
? predict.rpart Weidong Gu On Mon, Aug 29, 2011 at 12:49 PM, Jay josip.2...@gmail.com wrote: Hi, when I have made a decision tree with rpart, is it possible to apply this tree to a new set of data in order to find out the distribution of observations? Ideally I would like to plot my

Re: [R] rpart: apply tree to new data to get counts

2011-08-29 Thread Jay
I tried that, while I find the documentation a bit short, but the only result I get from this is a probability distribution of my data (I'm building a tree with 2 classes). How do I plot a tree where the counts are show in each step/node? BR, Jay On Aug 29, 9:40 pm, Weidong Gu