Closed avibryant closed 9 years ago
To elaborate a bit more on the steps that would be needed here:
Tree
that took a Map[Int,T]
with the validation distributions for each leaf, by ID, as well as an Error
and Voter
.TL
and TR
(for left and right) and the leaf validation distributions VL
and VR
(though actually our code should generalize to any number of children)E(TL,VL)
to denote the error object produced by comparing the training and validation distributions (this actually looks like error.create(tl, voter.combine(Some(vl)))
).+
to denote combining them.E(TL + TR, VL + VR) <= E(TL,VL) + E(TR,VR)
Tree
, we want a method on Trainer
that will construct the Map[Int,T]
from the trainingData
for each tree, and then transform the trees using the prune method.In progress at https://github.com/stripe/brushfire/pull/36
This is only really relevant to people building single-tree models, but you should be able to prune a single tree to minimize validation error