I have one question though. I heard from someone that in R, you can use extra packages to extract the decision rules implemented in RF, I try to google the same thing in python but without luck, if there is any help on how to achieve that. thanks in advance!
相关问题
- How to use Reshape keras layer with two None dimen
- How to conditionally scale values in Keras Lambda
- Trying to understand Pytorch's implementation
- Convolutional Neural Network seems to be randomly
- How to convert Onnx model (.onnx) to Tensorflow (.
相关文章
- what is the difference between transformer and est
- How to downgrade to cuda 10.0 in arch linux?
- ValueError: Unknown label type: 'continuous
- How to use cross_val_score with random_state
- Python loading old version of sklearn
- How to measure overfitting when train and validati
- McNemar's test in Python and comparison of cla
- How to disable keras warnings?
Assuming that you use sklearn RandomForestClassifier you can find the invididual decision trees as
.estimators_
. Each tree stores the decision nodes as a number of NumPy arrays undertree_
.Here is some example code which just prints each node in order of the array. In a typical application one would instead traverse by following the children.
Example outout:
We use something similar in emtrees to compile a Random Forest to C code.