policytree icon indicating copy to clipboard operation
policytree copied to clipboard

Add `repopulate_leaves` functionality

Open erikcs opened this issue 4 years ago • 0 comments

All the theory references for policytree are for adaptive trees, but some users may want to construct "honest" trees by fitting in one sample, then repopulating with the argmax in a new sample, like tree.new <- repopulate_leaves(tree.old. X, Y). This is fairly straight forward to implement in R (predict region with type="node.id", select argmax, then replace action ids in the internal tree data structure stored in the R object. We would not take pruning into account here though).

Leaving as an issue for now, awaiting feedback on potential interest, as @halflearned already has a separate Python solution working for his use case.

erikcs avatar Mar 07 '21 07:03 erikcs