Skip to content

prune in rpart: choose number terminal nodes

3 messages · agent dunham, Uwe Ligges, Brian Ripley

#
Dear community, 

I've an rpart object, and I know the CP I want.  I'd like to know if it's
possible also to fix the number of terminal nodes I want. 

Thanks in advance,  user at host.com as user at host.com



--
View this message in context: http://r.789695.n4.nabble.com/prune-in-rpart-choose-number-terminal-nodes-tp4643837.html
Sent from the R help mailing list archive at Nabble.com.
2 days later
#
On 21.09.2012 11:49, agent dunham wrote:
I don't know of any existing function, but you can write it yourself: 
All the information you need is available from the rpart object.

Uwe Ligges
#
On 23/09/2012 17:32, Uwe Ligges wrote:
Up to a point.  The pruning sequence does not include all possible 
numbers of 'terminal notes' (aka 'leaves').