rpart's loss matrix in ipred

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

rpart's loss matrix in ipred

Niels Smits
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.