Message-ID: <505F60CA.5090407@stats.ox.ac.uk>
Date: 2012-09-23T19:19:38Z
From: Brian Ripley
Subject: prune in rpart: choose number terminal nodes
In-Reply-To: <505F39A1.80207@statistik.tu-dortmund.de>
On 23/09/2012 17:32, Uwe Ligges wrote:
>
>
> On 21.09.2012 11:49, agent dunham wrote:
>> 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.
>
> 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.
Up to a point. The pruning sequence does not include all possible
numbers of 'terminal notes' (aka 'leaves').
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595