R package for Weighted Random Forest? classwt option? -


i'm trying use random forest predict outcome of extremely imbalanced data set (the 1's rate 1% or less). because traditinal randomforest minimize overall error rate, rather paying special attention positive class, makes traditional randomforest not applicable imbalanced data. want assigne high cost misclassification of minority class(cost sensitive learning).

i read several sources can use option classwt of randomforest on r, don't know how use this. , have other alternatives randomforest funtion?

classwt gives ability assign prior probability each of classes in dataset. so, if have classwt = c(0.5, 0.5), saying before running model specific dataset, expect there around same number of 0's 1's. can adjust these parameters try minimize false negatives. may seem smart idea assign cost in theory, in reality, not work well. prior probabilities tend affect algorithm more sharply desired. still, play around this.

an alternative solution run regular random forest, , prediction, use type='prob' option in predict() command. instance, random forest rf1, trying predict results of dataset data1, do:

predictions <- predict(rf1, data=data1, type='prob') 

then, can choose own probability threshold classifying observations of data. nice way graphically view threshold may desirable use rocr package, generates receiver operator curve.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -