[R] rpart's loss matrix in ipred

Niels Smits N.Smits at psy.vu.nl
Thu Aug 30 10:57:35 CEST 2007


Dear R users,

I have been using the rpart procedure to predict the occurrence of 
depression in a large data file. Since the prevalence is very low (5%), 
I have been using classification trees with a loss matrix that penalized 
false negatives more than false positives. I have become interesested in 
bagging these (successful!) classification trees, and have been using 
the ipred package for this. However, the ipred algorithm does not seem 
to do anything with the loss matrix I specify in

control=rpart.control(method="class",cp=0,xval=0,parms=list(loss=matrix(c(0,1,10,0)))

Am I doing anyting wrong or does the ipred package simply not allow for 
specifying such a matrix?

cheers!

-- 
Dr. Niels Smits
Research Methodology, 
Statistics and Data-analysis
Faculty of Psychology and Education
Vrije Universiteit Amsterdam
Van der Boechorststraat 1
1081 BT Amsterdam
The Netherlands
Tel:   +31 (0)20 5988713
Secr:  +31 (0)20 5988757
Fax:   +31 (0)20 5988758



More information about the R-help mailing list