Paolo Radaelli
2007-Mar-02 17:26 UTC
[R] Problem with user defined split function in Rpart
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