On 22.11.2010 08:32, meytar wrote:

Hello
I want to build a classification tree for a binary response variable
while the condition for the final tree should be :
The total misclassification for each group (zero or one) will be less then
10% .
for example: if I have in the root 100 observations, 90 from group 0 and 10
from group 1, I want that in the final tree a maximum of 9 and 1
observations out of group 0 and 1, respectively, will be misclassified.
Does anyone know what code will be appropriate for implementing this
condition?


If you mean the misclassification for new observations: no, otherwise I would be extremely rich.

If you meant the apparent error rate: Just grow a full tree and then prune step by step until the error is too large for your condition. Then just take the tree model from one step before ....

Uwe Ligges







Thank you in advance
Meytar

______________________________________________
R-help@r-project.org 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.

Reply via email to