Closed cstetter closed 1 year ago
Hey @cstetter
Unfortunately, we don't have that kind of plotting functionality built-in.
However, we do use the Scikit-learn DecisionTreeRegressor implementation internally, so you might be able to access that inside the MAB object and then use plotting functionality from Scikit-learn or elsewhere.
You can access the individual decision trees for each arm using something like below:
treebandit = MAB(...)
arm_to_tree = treebandit._imp.arm_to_tree
@cstetter if you end up using the internal treebandit._imp.arm_to_tree
as mentioned the above and have a plotting functionality available (with usual sklearn tree plotting), it would be cool if you share a PR with us to showcase that in the treebandit example https://github.com/fidelity/mabwiser/blob/master/examples/contextual_mab.py#L216
If you like our library, we would much appreciate a github star 🌟 to spread the word!
@bkleyn Thanks, this works perfectly! @skadio I'll try to do that ASAP.
Thank you for your help.
very cool!
I have chosen a decision tree as neighborhood policy. Is there any way to get the output of the decision tree, e.g. as an image?