Question regarding RF weights

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question regarding RF weights

Nathaniel Smoker

I’m using the random forest classifier in Weka. When the algorithm selects the best feature for a tree node based on the class impurity measure, it calculates the information (entropy) of the class for each value of a categorical feature, in my case I have only binary features. It then computes the class impurity measure based on a weighted sum of those information values, where the weight for each feature value is given by the relative frequency of that feature value in the dataset.

I want to modify the calculation of that weight for each feature value, but I cannot find the part of the code where that weight is calculated.

Can you please tell me which part of the code handles this?

 

 


_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding RF weights

Peter Reutemann
> I’m using the random forest classifier in Weka. When the algorithm selects the best feature for a tree node based on the class impurity measure, it calculates the information (entropy) of the class for each value of a categorical feature, in my case I have only binary features. It then computes the class impurity measure based on a weighted sum of those information values, where the weight for each feature value is given by the relative frequency of that feature value in the dataset.
>
> I want to modify the calculation of that weight for each feature value, but I cannot find the part of the code where that weight is calculated.
>
> Can you please tell me which part of the code handles this?

RandomForest uses RandomTree as the base classifier for its forest.
Have a look at that class.

Cheers, Peter
--
Peter Reutemann
Dept. of Computer Science
University of Waikato, NZ
+64 (7) 577-5304
http://www.cms.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to [hidden email]
To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html