[R] rpart weight parameter and random forest based on rpart

From: Wong Hang <wonghang_at_gmail.com>
Date: Tue, 20 Dec 2011 17:12:55 +0800

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]]

R-help_at_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. Received on Tue 20 Dec 2011 - 09:31:43 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 20 Dec 2011 - 11:10:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive