[R] Problem with user defined split function in Rpart
Paolo Radaelli
paolo.radaelli at unimib.it
Fri Mar 2 18:26:23 CET 2007
Dear all,
I'm trying to manage with user defined split function in rpart. I (hope)
correctly defined three functions (eval, split, init) I need.
I tested these function by executing them step by step and they work
correctly.
When I try to build the tree by the rpart command (by specifying method= the
list of the my three functions) I get no errors but the tree I obtain
contains only the root !
I tried in different ways to understand the reason why the tree does not
grow up but I had not success ...
The only strange thing I observed is that the CP parameter in summary.rpart
is negative
CP nsplit rel error
1 -1.011038 0 1
Where does the problem lie ?
Thank you for any helpful suggestion.
Paolo Radaelli
Paolo Radaelli
Dipartimento di Metodi Quantitativi per le Scienze Economiche ed Aziendali
Facoltà di Economia
Università degli Studi di Milano-Bicocca
P.zza dell'Ateneo Nuovo, 1
20126 Milano
Italy
e-mail paolo.radaelli a unimib.it
More information about the R-help
mailing list