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.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
GabeOw/Random-Forest-Rule-Extraction
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 0
No packages published