[R] Predicting classification error from rpart

From: Anthony Staines <anthony.staines_at_gmail.com>
Date: Sat 15 Oct 2005 - 03:43:35 EST


Hi,

I think I'm missing something very obvious, but I am missing it, so I would be very grateful for help. I'm using rpart to analyse data on skull base morphology, essentially predicting sex from one or several skull base measurements. The sex of the people whose skulls are being studied is known, and lives as a factor (M,F) in the data. I want to get back predictions of gender, and particularly misclassification rates.

rpart produces output like this :-

> printcp(rpart.LFM)

Classification tree: rpart(formula = Sex ~ LFM, data = Brides2) Variables actually used in tree construction: LFM

Root node error: 44/104 = 0.42308                n= 104

        CP nsplit rel error  xerror    xstd
1 0.227273      0   1.00000 1.00000 0.11451
2 0.113636      1   0.77273 0.95455 0.11372
3 0.022727      2   0.65909 0.95455 0.11372
4 0.010000      5   0.59091 0.95455 0.11372

>

Presumably 'root node error' and 'rel error' are something to do with error but what? 'Root node error ' seems to be some sort of deviance, and I have no idea what 'rel error' is. the tree library does produce a simple estimate of misclassification, but rpart doesn't seem to.

Any ideas?

Thanks,
Anthony Staines

--
Dr. Anthony Staines, Senior Lecturer in Epidemiology.
School  of Public Health and Population Sciences, UCD, Earlsfort
Terrace, Dublin 2, Ireland.
Tel:- +353 1 716 7345. Fax:- +353 1 716 7407 Mobile:- +353 86 606 9713
Web:- http://phm.ucd.ie

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sat Oct 15 03:50:07 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:45 EST