Skip to content

The provided script extracts rules from each decision tree within a trained Random Forest model and aggregates them into a readable format. These rules can then be utilized independently for classification predictions, providing a more interpretable mechanism to understand and explain the model predictions on new or existing data.

License

Notifications You must be signed in to change notification settings

GabeOw/Random-Forest-Rule-Extraction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Random-Forest-Rule-Extraction

This code defines a function get_rules that extracts decision rules from individual decision trees in a Random Forest, and then applies this function to all the trees in the Random Forest model. It then organizes these rules along with associated class labels, sample sizes, and class probabilities into a DataFrame, and filters this DataFrame to only include rules that predict the positive class label.

About

The provided script extracts rules from each decision tree within a trained Random Forest model and aggregates them into a readable format. These rules can then be utilized independently for classification predictions, providing a more interpretable mechanism to understand and explain the model predictions on new or existing data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published