Wong Hang
2011-Dec-20 09:12 UTC
[R] rpart weight parameter and random forest based on rpart
Hi all, I am very new to R (only two days of studies). I know a little bit of statistical learning and looking for an implementation of CART and random forest and therefore I am now studying R. I tested with rpart and randomForest package, they are quite good. However, I need a classification tree and for each training data, there is different loss. (i.e. the loss function is not purely 0-1, say, c_i > 0 for each training data) I read the document of randomForest and found that there are no such parameter, and then I move to rpart package to check if I can do it and perform the bagging process by myself. I found that there is a "weights" parameter for rpart. Is it the one that I can use and it will ultimately modify the Gini / Cross-entropy calculation during the learning process? If it is yes, and I want to do the bagging process by myself without referencing to randomForest package, is there any meta-algorithm package available for this purpose? Thank you very much. Best regards, WONG Hang. P.S. I have tested party package also. But it is not quite suitable for me and I face some errors on it. [[alternative HTML version deleted]]
Reasonably Related Threads
- Collapsing solution to the question discussed above: Re: multi-class classification using rpart
- How does rpart computes "improve" for split="information"?? (which seems to be different then the "gini" case)
- In rpart, how is "improve" calculated? (in the "class" case)
- rpart subsets
- rpart subset fix