I want to extract and visualize the decision rules of a scikit-learn GradientBoostingClassifier
. If it were just one DecisionTreeClassifier I'd use tree.export_graphviz
, but GradientBoostingClassifier
is an ensemble of trees. I don't know how I'd use export_graphviz
on them.
If anyone knows of a way to do so, it will be very helpful.
Someone has solved the problem. "You can use clf.estimators_ to retrieve the DecisionTreeRegressor objects corresponding to each boosting stage and call export_graphviz to generate the tree visualization.. http://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingClassifier.html"